From 8676f5fa1940eaef698e66d8343cedb9cb7af36b Mon Sep 17 00:00:00 2001 From: Gaurav Date: Sun, 20 Mar 2011 23:43:33 +0000 Subject: CLI : Fix memory free for key_fixed. Signed-off-by: Gaurav Signed-off-by: Vijay Bellur BUG: 2554 (Invalid memory access in glusterd.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2554 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 10 +++++----- 1 file 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 a25f4909b10..859af80924e 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; + } } -- cgit