summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-11-23 12:23:05 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-11-27 08:56:01 +0000
commitc7eb1883bea6e72a72908b2e2966d4893d47db16 (patch)
treeb8d7fd22d1a0198c203ab8bac74bd40bcb5cc29b /xlators
parent01f3358501672e7c0fa8ae1f749f060af29bcd69 (diff)
downloadglusterfs-c7eb1883bea6e72a72908b2e2966d4893d47db16.tar.gz
glusterfs-c7eb1883bea6e72a72908b2e2966d4893d47db16.tar.xz
glusterfs-c7eb1883bea6e72a72908b2e2966d4893d47db16.zip
glusterd : fix high sev coverity issue
This patch fixes CID : 1174824 : RESOURCE_LEAK Change-Id: I59d2d6ebc1fa3d7ebe0b97c7dbe3c5539128522a updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index ff02d68d72..e37d22616a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -4564,7 +4564,6 @@ glusterd_store_retrieve_peers(xlator_t *this)
ret = gf_store_iter_get_next(iter, &key, &value, &op_errno);
if (ret) {
- (void)gf_store_iter_destroy(iter);
goto next;
}
@@ -4610,8 +4609,6 @@ glusterd_store_retrieve_peers(xlator_t *this)
goto next;
}
- (void)gf_store_iter_destroy(iter);
-
if (gf_uuid_is_null(peerinfo->uuid)) {
gf_log("", GF_LOG_ERROR,
"Null UUID while attempting to read peer from '%s'",
@@ -4638,6 +4635,8 @@ glusterd_store_retrieve_peers(xlator_t *this)
is_ok = _gf_true;
next:
+ (void)gf_store_iter_destroy(iter);
+
if (!is_ok) {
gf_log(this->name, GF_LOG_WARNING,
"skipping malformed peer file %s", entry->d_name);