lib/talloc: Fix CID 1291640 Missing unlock
authorAnoop C S <anoopcs@redhat.com>
Mon, 3 Aug 2015 08:27:19 +0000 (13:57 +0530)
committerMichael Adam <obnox@samba.org>
Thu, 6 Aug 2015 20:27:20 +0000 (22:27 +0200)
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/talloc/testsuite.c

index 6d0fe94479e3b80326e4159ad94f035d20dc0db1..011ad21eadb0976171e8def7e3b1aa2579f3af94 100644 (file)
@@ -1747,6 +1747,7 @@ static void *thread_fn(void *arg)
                ret = pthread_cond_wait(&condvar, &mtx);
                if (ret != 0) {
                        talloc_free(top_ctx);
+                       pthread_mutex_unlock(&mtx);
                        return NULL;
                }
        }