[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Don't leak a cond var when starting threads in a pool



commit 424edd57105ea6eaf96d7db66e00ac1298f9dc52
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Sun Feb 15 11:21:54 2015 +0100

    Don't leak a cond var when starting threads in a pool
---
 src/common/workqueue.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/common/workqueue.c b/src/common/workqueue.c
index 5da29d5..e9466b8 100644
--- a/src/common/workqueue.c
+++ b/src/common/workqueue.c
@@ -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;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits