summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorGaurav <gaurav@gluster.com>2011-03-18 03:52:08 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-18 20:36:43 -0700
commitdece0547259a5d73fd6c2616802f83388b5ff4da (patch)
tree37921cd685949653c388d5eb4647983c116c6b4f /xlators/mgmt/glusterd/src
parentbb5b31fb96dbc2092e2967924462c59863845749 (diff)
CLI : Fix memory free for key_fixed.
Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2554 (Invalid memory access in glusterd.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2554
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 38062426abc..f27e260bd88 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1291,11 +1291,6 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
goto out;
}
- if (key_fixed) {
- GF_FREE (key_fixed);
- key_fixed = NULL;
- }
-
*op_errstr = NULL;
if (!global_opt)
ret = glusterd_validate_reconfopts (volinfo, val_dict, op_errstr);
@@ -1314,6 +1309,11 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
goto out;
}
dict_del (val_dict, key);
+
+ if (key_fixed) {
+ GF_FREE (key_fixed);
+ key_fixed = NULL;
+ }
}