summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index fa40674510f..688b995f0e1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -2770,14 +2770,17 @@ glusterd_verify_slave (char *volname, char *slave_url, char *slave_vol,
/* Tokenize the error message from gverify.sh to figure out
* if the error is a force blocker or not. */
tmp = strtok_r (buf, "|", &save_ptr);
+ if (!tmp) {
+ ret = -1;
+ goto out;
+ }
if (!strcmp (tmp, "FORCE_BLOCKER"))
*is_force_blocker = 1;
else {
/* No FORCE_BLOCKER flag present so all that is
* present is the error message. */
*is_force_blocker = 0;
- if (tmp)
- *op_errstr = gf_strdup (tmp);
+ *op_errstr = gf_strdup (tmp);
ret = -1;
goto out;
}