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>
This commit is contained in:
Sunny Kumar 2018-11-23 12:23:05 +05:30 committed by Atin Mukherjee
parent 01f3358501
commit c7eb1883be

View File

@ -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);