On Wed, Jun 29, 2016 at 10:50:20PM +0200, Greg Kurz wrote: > When a core is being realized, we create a child object for each thread > of the core. > > The child is first initialized with object_initialize() which sets its ref > count to 1, and then added to the core with object_property_add_child() > which bumps the ref count to 2. > > When the core gets released, object_unparent() decreases the ref count to 1, > and we g_free() the object: we hence loose the reference on an unfinalized > object. This is likely to cause random crashes. > > Let's drop the extra reference as soon as we don't need it, after the > thread is added to the core. > > Signed-off-by: Greg Kurz <gr...@kaod.org>
Reviewed-by: Bharata B Rao <bhar...@linux.vnet.ibm.com>