summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2012-06-01 00:52:43 +0530
committerAnand Avati <avati@redhat.com>2012-06-05 15:46:23 -0700
commita7370dc95ec2a875c937c682e6f0c8aa31c91b4a (patch)
treed150ad722685e8559ee49c7275c2d9ccefca31e3
parentada4ab0bb93d00fcccbd566cb9cce8265ecf7c67 (diff)
glusterfsd: further fd leak fixes for graph change
Change-Id: I8e23d6bb95cddbb3862c524d79d1a956956b7a51 BUG: 789278 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3527 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 073ed54a0..6122a76a3 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;
}