From a7370dc95ec2a875c937c682e6f0c8aa31c91b4a Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 1 Jun 2012 00:52:43 +0530 Subject: glusterfsd: further fd leak fixes for graph change Change-Id: I8e23d6bb95cddbb3862c524d79d1a956956b7a51 BUG: 789278 Signed-off-by: Csaba Henk Reviewed-on: http://review.gluster.com/3527 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- glusterfsd/src/glusterfsd-mgmt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 073ed54a0d5..6122a76a36e 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -1601,6 +1601,8 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = glusterfs_process_volfp (ctx, tmpfp); + /* tmpfp closed */ + tmpfp = NULL; if (ret) goto out; @@ -1626,6 +1628,10 @@ out: ctx->cmd_args.volfile_id); cleanup_and_exit (0); } + + if (tmpfp) + fclose (tmpfp); + return 0; } -- cgit