]> git.proxmox.com Git - mirror_qemu.git/commit
hmp: Fix drive_add ... format=help crash
authorMarkus Armbruster <armbru@redhat.com>
Mon, 8 Apr 2019 15:30:03 +0000 (17:30 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 8 Apr 2019 15:42:06 +0000 (17:42 +0200)
commitab63817119b03b95f7dce6fae036e6d063ad63fb
tree89964ebab615f03f7562246854d4ae52a26bd959
parent3f48686faca1856d74c244b151da1d3a521ef967
hmp: Fix drive_add ... format=help crash

drive_new() returns null without setting an error when it provided
help.  add_init_drive() assumes null means failure, and crashes trying
to report a null error.

Fixes: c4f26c9f37ce511e5fe629c21c180dc6eb7c5a25
Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
device-hotplug.c
tests/test-hmp.c