summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 23824bd4ec3..1381edbab9d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -1362,6 +1362,8 @@ gd_unlock_op_phase (glusterd_conf_t *conf, glusterd_op_t op, int *op_ret,
struct list_head *peers = NULL;
peers = &conf->xaction_peers;
+ this = THIS;
+ GF_ASSERT (this);
if (!npeers) {
ret = 0;
@@ -1375,7 +1377,6 @@ gd_unlock_op_phase (glusterd_conf_t *conf, glusterd_op_t op, int *op_ret,
goto out;
}
- this = THIS;
synctask_barrier_init((&args));
peer_cnt = 0;
if (conf->op_version < GD_OP_VERSION_3_6_0) {
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 8515320d894..94949e79111 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -8435,9 +8435,10 @@ glusterd_get_local_brickpaths (glusterd_volinfo_t *volinfo, char **pathlist)
ret = count;
out:
- for (i = 0; i < count; i++) {
- GF_FREE (path_tokens[i]);
- path_tokens[i] = NULL;
+ if (path_tokens) {
+ for (i = 0; i < count; i++) {
+ GF_FREE (path_tokens[i]);
+ }
}
GF_FREE (path_tokens);