summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2012-09-13 12:33:31 +0530
committerVijay Bellur <vbellur@redhat.com>2012-12-12 00:14:50 -0500
commit5602894f0fbb7db476314e28451fbcff848b5b9d (patch)
treea32fc5606829f1218d429dc8535def4c96aa6243
parent1a14fa83f06e2c92a6c1c05d70180daaeaa78d4c (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: https://code.engineering.redhat.com/gerrit/1862 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@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 8c6e63c..8199fbc 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;
}