[sheepdog-users] [PATCH stable-0.8 21/22] lib/work: kill a possible memory leaker

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Mon Feb 24 08:07:09 CET 2014


From: Liu Yuan <namei.unix at gmail.com>

Though in reality, this wouldn't happen.

Reviewed-by: Robin Dong <sanbai at taobao.com>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 lib/work.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/work.c b/lib/work.c
index d483136..35413ff 100644
--- a/lib/work.c
+++ b/lib/work.c
@@ -428,6 +428,7 @@ destroy_threads:
 	sd_destroy_cond(&wi->pending_cond);
 	sd_destroy_mutex(&wi->pending_lock);
 	sd_destroy_mutex(&wi->finished_lock);
+	free(wi);
 
 	return NULL;
 }
-- 
1.7.10.4




More information about the sheepdog-users mailing list