aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-06-11 11:58:30 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-17 23:25:24 +0200
commit76a6e1cc7cc3ad022e7159b37b291b75bc4615bf (patch)
tree3a8249610b341035e314d97f9be91be411735747
parent33cbb2c546594685131e771e2e0972418b9d0301 (diff)
downloadqemu-76a6e1cc7cc3ad022e7159b37b291b75bc4615bf.zip
qemu-76a6e1cc7cc3ad022e7159b37b291b75bc4615bf.tar.gz
qemu-76a6e1cc7cc3ad022e7159b37b291b75bc4615bf.tar.bz2
qom: object: delete properties before calling instance_finalize
This ensures that the children's unparent callback will still have a usable parent. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--qom/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c
index 0e8267b..f301bc2 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -418,8 +418,8 @@ static void object_finalize(void *data)
Object *obj = data;
TypeImpl *ti = obj->class->type;
- object_deinit(obj, ti);
object_property_del_all(obj);
+ object_deinit(obj, ti);
g_assert(obj->ref == 0);
if (obj->free) {