|
|
14f8ab |
From 7e1bf1e338a6effe209f57b1b92a70d5d25a73bf Mon Sep 17 00:00:00 2001
|
|
|
14f8ab |
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
14f8ab |
Date: Mon, 26 Aug 2019 11:32:18 +0530
|
|
|
14f8ab |
Subject: [PATCH 428/449] glusterd/ganesha: fixing resource leak in
|
|
|
14f8ab |
tear_down_cluster()
|
|
|
14f8ab |
|
|
|
14f8ab |
backport of https://review.gluster.org/#/c/glusterfs/+/23295/
|
|
|
14f8ab |
>CID: 1370947
|
|
|
14f8ab |
>Updates: bz#789278
|
|
|
14f8ab |
>Change-Id: Ib694056430ff0536ed705a0e77e5ace22486891e
|
|
|
14f8ab |
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
14f8ab |
|
|
|
14f8ab |
BUG: 1787310
|
|
|
14f8ab |
Change-Id: Ib694056430ff0536ed705a0e77e5ace22486891e
|
|
|
14f8ab |
Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
|
|
|
14f8ab |
Reviewed-on: https://code.engineering.redhat.com/gerrit/202561
|
|
|
14f8ab |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
14f8ab |
---
|
|
|
14f8ab |
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 8 ++++++++
|
|
|
14f8ab |
1 file changed, 8 insertions(+)
|
|
|
14f8ab |
|
|
|
14f8ab |
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
14f8ab |
index 0a16925..06f028f 100644
|
|
|
14f8ab |
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
14f8ab |
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
14f8ab |
@@ -659,10 +659,18 @@ tear_down_cluster(gf_boolean_t run_teardown)
|
|
|
14f8ab |
"Failed to close dir %s. Reason :"
|
|
|
14f8ab |
" %s",
|
|
|
14f8ab |
CONFDIR, strerror(errno));
|
|
|
14f8ab |
+ goto exit;
|
|
|
14f8ab |
}
|
|
|
14f8ab |
}
|
|
|
14f8ab |
|
|
|
14f8ab |
out:
|
|
|
14f8ab |
+ if (dir && sys_closedir(dir)) {
|
|
|
14f8ab |
+ gf_msg_debug(THIS->name, 0,
|
|
|
14f8ab |
+ "Failed to close dir %s. Reason :"
|
|
|
14f8ab |
+ " %s",
|
|
|
14f8ab |
+ CONFDIR, strerror(errno));
|
|
|
14f8ab |
+ }
|
|
|
14f8ab |
+exit:
|
|
|
14f8ab |
return ret;
|
|
|
14f8ab |
}
|
|
|
14f8ab |
|
|
|
14f8ab |
--
|
|
|
14f8ab |
1.8.3.1
|
|
|
14f8ab |
|