]> Git Repo - qemu.git/commit - qdev-monitor.c
qdev-monitor: fix segmentation fault on qdev_device_help()
authorGonglei <[email protected]>
Tue, 16 Sep 2014 02:19:33 +0000 (10:19 +0800)
committerStefan Hajnoczi <[email protected]>
Mon, 22 Sep 2014 10:39:18 +0000 (11:39 +0100)
commit0722eba9450cb8be9713fec1caa0772330739586
tree90562c47712dfb542c89a2c291256f15556eef75
parent8007429a99d6ea8480ba0a7a5fb5ae92473f798c
qdev-monitor: fix segmentation fault on qdev_device_help()

Normally, qmp_device_list_properties() may return NULL when
a device haven't special properties excpet Object and DeviceState
properties, such as virtio-balloon-device.

We just need check local_err instead of prop_list.

Example:

Segmentation fault (core dumped)

The backtrace as below:

Program received signal SIGSEGV, Segmentation fault.
0x00005555559af1a8 in error_get_pretty (err=0x0) at util/error.c:152
152         return err->msg;
(gdb) bt
    func=0x55555574a6ca <device_help_func>, opaque=0x0, abort_on_failure=0) at util/qemu-option.c:1072

Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
qdev-monitor.c
This page took 0.024365 seconds and 4 git commands to generate.