From 5992b6435c9b71b436eecd12a8aabb412ca8a5e8 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Sun, 1 Nov 2009 15:22:36 +0200 Subject: [PATCH] Added a forgotten unlock on an error condition --- src/api/thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/thread.c b/src/api/thread.c index 11bf8a4..5034b4b 100644 --- a/src/api/thread.c +++ b/src/api/thread.c @@ -286,6 +286,7 @@ int thread_setup_space(struct ktcb *tcb, struct task_ids *ids, unsigned int flag else if (flags & TC_COPY_SPACE) { mutex_lock(&curcont->space_list.lock); if (!(space = address_space_find(ids->spid))) { + mutex_unlock(&curcont->space_list.lock); ret = -ESRCH; goto out; }