summaryrefslogtreecommitdiffstats
path: root/cli
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:23 -0700
commit92d2720b2764c2ce399751b1cbbf691fc3f53489 (patch)
tree77c0843d82c3768ee8f74b2fec2041ee216db6ba /cli
parentdc772ca6b0fcba8dc4ff4506ac7c171e289bd78a (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/3943 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli')
-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 3b424ca2412..322d4d9ad07 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -696,12 +696,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;
}