summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2012-09-13 12:33:31 +0530
committerAnand Avati <avati@redhat.com>2012-09-14 01:30:30 -0700
commit21ed135a5ab503ba31048a983038d354c0f7a1b2 (patch)
tree7e8015e79547a5604d9fb57862ab0214ea1dc895
parent2635c4a68d82be731461bb3c31188e5dd0093e7d (diff)
cli: Fix double free in cli_add_key_group
Change-Id: I3c2f030ac7c53913612a3fbac5e582c47b005621 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3944 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--cli/src/cli-cmd-parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index ecdf61a..006c8a4 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -689,12 +689,14 @@ cli_add_key_group (dict_t *dict, char *key, char *value)
ret = dict_set_dynstr (dict, iter_key, dkey);
if (ret)
goto out;
+ dkey = NULL;
snprintf (iter_val, sizeof (iter_val), "value%d", opt_count);
dval = gf_strdup (tok_val);
ret = dict_set_dynstr (dict, iter_val, dval);
if (ret)
goto out;
+ dval = NULL;
}