summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorRinku Kothiya <rkothiya@redhat.com>2018-12-04 19:27:27 +0530
committerAmar Tumballi <amarts@redhat.com>2018-12-05 22:17:58 +0000
commit7ea5f438f60df9aa16027030f2b24f31bc07524b (patch)
treeaefcd0b8b3c7b3dd50c27e195ad408b5dfae23ba /cli
parent20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5 (diff)
cli: memory leak issue reported by asan
This patch fixes dict leak in cli_cmd_volume_stop_cbk. SUMMARY: AddressSanitizer: 640 byte(s) leaked in 4 allocation(s) Credits: Mohit Agrawal Change-Id: If14983b8588e68d16d6bbb04b87e2f06fb97023d fixes: bz#1633930 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-volume.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index c14faabc4f9..9655202b668 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -556,6 +556,8 @@ out:
}
CLI_STACK_DESTROY(frame);
+ if (dict)
+ dict_unref(dict);
if (ret == 0 && GF_ANSWER_YES == answer) {
gf_event(EVENT_VOLUME_STOP, "name=%s;force=%d", (char *)words[2],