summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2019-08-26 11:32:18 +0530
committerAmar Tumballi <amarts@gmail.com>2019-09-23 13:52:19 +0000
commit9fa05e11b802ddd03825bbe54968e0937878f2b7 (patch)
tree7f368a55e78bd6c64d7ce99731ea55ba08b84019 /xlators/mgmt
parent30d3608c43be119f75da7798d88b94601dedcb29 (diff)
glusterd/ganesha: fixing resource leak in tear_down_cluster()
CID: 1370947 Updates: bz#789278 Change-Id: Ib694056430ff0536ed705a0e77e5ace22486891e Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index 0a16925c19b..06f028f5d8d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -659,10 +659,18 @@ tear_down_cluster(gf_boolean_t run_teardown)
"Failed to close dir %s. Reason :"
" %s",
CONFDIR, strerror(errno));
+ goto exit;
}
}
out:
+ if (dir && sys_closedir(dir)) {
+ gf_msg_debug(THIS->name, 0,
+ "Failed to close dir %s. Reason :"
+ " %s",
+ CONFDIR, strerror(errno));
+ }
+exit:
return ret;
}