aboutsummaryrefslogtreecommitdiff
path: root/translate-all.c
diff options
context:
space:
mode:
authorAmos Kong <akong@redhat.com>2014-03-03 15:57:55 +0800
committerAndreas Färber <afaerber@suse.de>2014-03-12 20:13:02 +0100
commit7b0309490cb108d881a0c66d6b350b4db7b3b4ac (patch)
treee8ef8ce540d3fa37372e435e82ac31970e95a969 /translate-all.c
parent267a3264cdaf0ca945ffc7a60c019ad9f89be8d8 (diff)
qdev-monitor: Set properties after parent is assigned in device_add
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 from its parent bus, but the device hasn't been added to QOM tree yet. When it fails to set properties, object_unparent() can't clean up the device. Delay setting of device properties until the device has been added to the QOM composition tree. This way, when setting a property fails, object_unparent() can clean up the device properly. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'translate-all.c')
0 files changed, 0 insertions, 0 deletions