Re: [Qemu-devel] [PATCH 4/8] qdev: fix object reference leak in case device.realize() fails

2016-07-21 Thread David Gibson
On Thu, Jul 21, 2016 at 05:54:35PM +0200, Igor Mammedov wrote: > If device doesn't have parent assined before its realize > is called, device_set_realized() will implicitly set parent > to '/machine/unattached'. > > However device_set_realized() may fail after that point at > several other points

[Qemu-devel] [PATCH 4/8] qdev: fix object reference leak in case device.realize() fails

2016-07-21 Thread Igor Mammedov
If device doesn't have parent assined before its realize is called, device_set_realized() will implicitly set parent to '/machine/unattached'. However device_set_realized() may fail after that point at several other points leaving not realized object dangling in '/machine/unattached' and as result