]> git.proxmox.com Git - mirror_qemu.git/commit - qom/object.c
qom: object: move unparenting to the child property's release callback
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Jun 2014 09:57:38 +0000 (11:57 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 17 Aug 2014 21:25:24 +0000 (23:25 +0200)
commitbffc687d66604e68c14f6277b595b33966eb328a
tree592506a646a96de665751d870b3f80def0d54436
parent76a6e1cc7cc3ad022e7159b37b291b75bc4615bf
qom: object: move unparenting to the child property's release callback

This ensures that the unparent callback is called automatically
when the parent object is finalized.

Note that there's no need to keep a reference neither in
object_unparent nor in object_finalize_child_property.  The
reference held by the child property itself will do.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qom/object.c