qemu-e2k/qom
Paolo Bonzini da5a44e8b0 qom: object_delete should unparent the object first
object_deinit is only called when the reference count goes to zero,
and yet tries to do an object_unparent.  Now, object_unparent
either does nothing or it will decrease the reference count.
Because we know the reference count is zero, the object_unparent
call in object_deinit is useless.

Instead, we need to disconnect the object from its parent just
before we remove the last reference apart from the parent's.  This
happens in object_delete.  Once we do this, all calls to
object_unparent peppered through QEMU can go away.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-23 20:19:59 -05:00
..
container.c qom: Fix memory leak in function container_get 2012-05-03 07:04:48 +02:00
cpu.c qom: Introduce CPU class 2012-03-14 22:20:27 +01:00
Makefile.objs build: adapt qom/Makefile and move it to Makefile.objs 2012-06-07 09:21:12 +02:00
object.c qom: object_delete should unparent the object first 2012-08-23 20:19:59 -05:00
qom-qobject.c qom: add QObject-based property get/set wrappers 2012-02-07 13:52:40 +01:00