[Qemu-devel] [PATCH v2 1/4] spapr_cpu_core: drop reference on ICP object during CPU realization

2017-05-19 Thread Greg Kurz
When a piece of code allocates an object, it implicitely gets a reference on it. If it then makes that object a child property of another object, it should drop its own reference at some point otherwise the child object can never be finalized. The current code hence leaks one ICP object per CPU whe

Re: [Qemu-devel] [PATCH v2 1/4] spapr_cpu_core: drop reference on ICP object during CPU realization

2017-05-21 Thread David Gibson
On Fri, May 19, 2017 at 12:32:04PM +0200, Greg Kurz wrote: > When a piece of code allocates an object, it implicitely gets a reference > on it. If it then makes that object a child property of another object, it > should drop its own reference at some point otherwise the child object can > never be