소스 검색

Don't leak a cond var when starting threads in a pool

Sebastian Hahn 10 년 전
부모
커밋
424edd5710
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/common/workqueue.c

+ 1 - 0
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;