summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-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 ff02d68d722..e37d22616ac 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);