summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorHarpreet kaur <hlalwani@redhat.com>2018-12-04 18:09:49 +0530
committerAmar Tumballi <amarts@redhat.com>2018-12-05 21:34:56 +0000
commitafc3006b46bf9d6eb05e39af68bcd81041761a9c (patch)
tree6eb0e9a04e007288401f8cbabb8821ca896c64e4 /cli
parent382ad46bbcb79344285d5cb1fe3ce85f83317c44 (diff)
cli: memory leak issue reported by asan
This patch fixes Indirect leaks in cli-cmd-volume.c Leaks are happening in cli_cmd_quota_cbk and cli_cmd_quota_handle_list_all. SUMMARY: AddressSanitizer: 1152 byte(s) leaked in 8 allocation(s) Updates: bz#1633930 Change-Id: Ia6c0306e88bd81f74d1220303ead8095fbcf5623 Signed-off-by: Harpreet kaur <hlalwani@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-volume.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 55917e8217c..ea4484eb3f7 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1749,6 +1749,8 @@ out:
"xml format");
}
}
+ if (xdata)
+ dict_unref(xdata);
if (fd != -1) {
sys_close(fd);
@@ -1970,6 +1972,8 @@ out:
"Quota command failed. Please check the cli "
"logs for more details");
}
+ if (options)
+ dict_unref(options);
/* Events for Quota */
if (ret == 0) {