[sheepdog] [PATCH stable-0.8 20/22] sheep: fix memory leak in local_req_async_main()
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Feb 24 08:07:08 CET 2014
From: Robin Dong <sanbai at taobao.com>
We find out a memory-leak point in local_req_async_main() by valgrind.
After fix it, the RSS of sheep daemon could keep stablely for press-testing.
Signed-off-by: Robin DOng <sanbai at taobao.com>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
sheep/request.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sheep/request.c b/sheep/request.c
index fbaf645..5867fa1 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -626,6 +626,7 @@ static void local_req_async_main(struct work *work)
areq->iocb->result = areq->result;
eventfd_xwrite(areq->iocb->efd, 1);
+ free(areq);
}
worker_fn int exec_local_req_async(struct sd_req *rq, void *data,
--
1.7.10.4
More information about the sheepdog
mailing list