qemu/qom
Paolo Bonzini 764b63125a qom: fix refcount of non-heap-allocated objects
The reference count for embedded objects is always one too low, because
object_initialize_with_type returns with zero references to the object.
This causes premature finalization of the object (or an assertion failure)
after calling object_ref to add an extra reference and object_unref to
remove it.

The fix is to move the initial object_ref call from object_new_with_type
to object_initialize_with_type.

Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26 13:41:00 -06:00
..
container.c
cpu.c
Makefile.objs build: adapt qom/Makefile and move it to Makefile.objs 2012-06-07 09:21:12 +02:00
object.c qom: fix refcount of non-heap-allocated objects 2012-11-26 13:41:00 -06:00
qom-qobject.c