Re: [Qemu-devel] [PATCH] scsi: give device a parent before setting properties

2015-02-19 Thread Markus Armbruster
Paolo Bonzini writes: > This mimics what is done in qdev_device_add, and lets the device be > freed in case something goes wrong. Otherwise, object_unparent returns > immediately without freeing the device, which is on the other hand left > in the parent bus's list of children. > > scsi_bus_lega

[Qemu-devel] [PATCH] scsi: give device a parent before setting properties

2015-02-19 Thread Paolo Bonzini
This mimics what is done in qdev_device_add, and lets the device be freed in case something goes wrong. Otherwise, object_unparent returns immediately without freeing the device, which is on the other hand left in the parent bus's list of children. scsi_bus_legacy_handle_cmdline then returns an e