diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-03-16 11:14:31 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-03-17 15:47:56 +0100 |
commit | f8746fb804dad4858796363adb06c56543111062 (patch) | |
tree | ccc9d9d569bfdf1ee96501a1c645b27c3b1c52c9 /blockdev.c | |
parent | 23f7fcb2956cc094cae008100cb1cb1fe505d00a (diff) | |
download | qemu-f8746fb804dad4858796363adb06c56543111062.zip |
block: Fix memory leak in hmp_drive_add_node()
hmp_drive_add_node() leaked qdict in the error path when no node-name is
specified.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index e7b8676495..50410bf328 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3898,6 +3898,7 @@ void hmp_drive_add_node(Monitor *mon, const char *optstr) qdict = qemu_opts_to_qdict(opts, NULL); if (!qdict_get_try_str(qdict, "node-name")) { + QDECREF(qdict); error_report("'node-name' needs to be specified"); goto out; } |