]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't leak a cond var when starting threads in a pool
authorSebastian Hahn <sebastian@torproject.org>
Sun, 15 Feb 2015 10:21:54 +0000 (11:21 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Sun, 15 Feb 2015 10:21:54 +0000 (11:21 +0100)
src/common/workqueue.c

index 5da29d5ab98cacbb01b17be0d8ca48f3f956bacf..e9466b81248a22060d9c333f635da8da06985fcc 100644 (file)
@@ -410,6 +410,7 @@ threadpool_new(int n_threads,
   pool->reply_queue = replyqueue;
 
   if (threadpool_start_threads(pool, n_threads) < 0) {
+    tor_cond_uninit(&pool->condition);
     tor_mutex_uninit(&pool->lock);
     tor_free(pool);
     return NULL;