projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23f7fcb
)
block: Fix memory leak in hmp_drive_add_node()
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 16 Mar 2016 10:14:31 +0000
(11:14 +0100)
committer
Kevin Wolf
<kwolf@redhat.com>
Thu, 17 Mar 2016 14:47:56 +0000
(15:47 +0100)
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>
blockdev.c
patch
|
blob
|
history
diff --git
a/blockdev.c
b/blockdev.c
index e7b8676495bd1b959c6af2b686ade73fb1a456be..50410bf328e4ddb0526af9ce0b52d0cf70271363 100644
(file)
--- 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;
}