summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurav <gaurav@gluster.com>2011-03-20 23:43:33 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-22 06:04:34 -0700
commit8676f5fa1940eaef698e66d8343cedb9cb7af36b (patch)
tree07c08f172e49f65a099da0bd3613f51fa7971529
parent450875b04c1f5375c04bfdaa3c6b6709ca9dafe3 (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
-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 a25f490..859af80 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1212,11 +1212,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);
@@ -1235,6 +1230,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;
+ }
}