Skip to contentSkip to conversation

complib: Fix memory leak in cl_thread_pool_destroy function

PATCH New Hal Rosenstock 1 participant 1 message Jun 24, 2013 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 complib: Fix memory leak in cl_thread_pool_destroy function

From: Vladimir Koushnir <vladimirk-VPRAkNaXOzVWk0Htik3J/[email protected]>

---
 complib/cl_threadpool.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
complib/cl_threadpool.c +3 -0
index 0f6498b..11abfbb 100644
@@ -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);
 
Signature · 6 lines
1.7.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html