Amos Kong <ak...@redhat.com> writes: > Test steps: > (qemu) device_add e1000,addr=adsf > Property 'e1000.addr' doesn't take value 'adsf' > (qemu) info qtree > Then qemu crashed. > > Currently we set a link to the new device for qdev parent bus, but the > device hasn't been added to QOM tree. When it fails to set properties, > object_unparent() can't cleanup the device. > > This patch moves qdev_set_parent_bus() back to object_property_add_child(), > we only needs to unref the object if setting properties fails. > > Signed-off-by: Amos Kong <ak...@redhat.com>
Broken in commit e0a83fc. Could be mentioned in commit message. Tested-by: Markus Armbruster <arm...@redhat.com>