[sheepdog] [PATCH 2/9] sheep: fix vnode_info leak

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Sep 17 00:59:55 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/request.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/sheep/request.c b/sheep/request.c
index ec76b9b..bd7d663 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -429,6 +429,12 @@ static struct request *alloc_local_request(void *data, int data_length)
 	return req;
 }
 
+static void free_local_request(struct request *req)
+{
+	put_vnode_info(req->vinfo);
+	free(req);
+}
+
 /*
  * Exec the request locally and synchronously.
  *
@@ -461,7 +467,7 @@ again:
 
 	close(req->wait_efd);
 	ret = req->rp.result;
-	free(req);
+	free_local_request(req);
 
 	return ret;
 }
-- 
1.7.2.5




More information about the sheepdog mailing list