diff mbox

[opensm] complib: Fix memory leak in cl_thread_pool_destroy function

Message ID 51C86C1B.6030307@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock June 24, 2013, 3:56 p.m. UTC
From: Vladimir Koushnir <vladimirk@mellanox.com>

Signed-off-by: Vladimir Koushnir <vladimirk@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---
 complib/cl_threadpool.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/complib/cl_threadpool.c b/complib/cl_threadpool.c
index 0f6498b..11abfbb 100644
--- a/complib/cl_threadpool.c
+++ b/complib/cl_threadpool.c
@@ -129,6 +129,9 @@  void cl_thread_pool_destroy(IN cl_thread_pool_t * const p_thread_pool)
 			pthread_join(p_thread_pool->tid[i], NULL);
 
 	p_thread_pool->running_count = 0;
+
+	free(p_thread_pool->tid);
+
 	pthread_cond_destroy(&p_thread_pool->cond);
 	pthread_mutex_destroy(&p_thread_pool->mutex);