Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-17 Thread Markus Armbruster
"Gonglei (Arei)" writes: >> > >> >> > >> Doesn't this leak prop_list when local_err && prop_list? >> > >> >> > > No, it will not happen this situation. >> > > >> > >> Returning both a value in need of destruction and an error object is at >> > >> least highly unusual, and probably plain wrong. >>

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-17 Thread Gonglei (Arei)
> > >> > > >> Doesn't this leak prop_list when local_err && prop_list? > > >> > > > No, it will not happen this situation. > > > > > >> Returning both a value in need of destruction and an error object is at > > >> least highly unusual, and probably plain wrong. > > >> > > >> Should qmp_device_list

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-16 Thread Stefan Hajnoczi
On Tue, Sep 16, 2014 at 10:19:33AM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > 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_e

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-16 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Tuesday, September 16, 2014 4:00 PM > To: Gonglei (Arei) > Subject: Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on > qdev_device_help() > > "Gonglei (Arei)" writes: > > &

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-16 Thread Markus Armbruster
writes: > From: Gonglei > > 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 (cor

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-16 Thread Markus Armbruster
"Gonglei (Arei)" writes: >> From: Markus Armbruster [mailto:arm...@redhat.com] >> Sent: Tuesday, September 16, 2014 3:28 PM >> Subject: Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on >> qdev_device_help() >> >> writ

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-16 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Tuesday, September 16, 2014 3:28 PM > Subject: Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on > qdev_device_help() > > writes: > > > From: Gonglei > > > > Normally, qmp_device

[Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-15 Thread arei.gonglei
From: Gonglei 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