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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index aa63226a5aa..fa67c23e979 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -844,6 +844,9 @@ glusterd_store_iter_get_next (glusterd_store_iter_t *iter,
*value = gf_strdup (iter_val);
*key = gf_strdup (iter_key);
+ if (!iter_key || !iter_val)
+ goto out;
+
ret = 0;
out:
@@ -1438,6 +1441,11 @@ glusterd_store_retrieve_peers (xlator_t *this)
goto out;
ret = glusterd_store_iter_get_next (iter, &key, &value);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR, "key: %p, and value: %p",
+ key, value);
+ goto out;
+ }
while (!ret) {