]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qom: object: delete properties before calling instance_finalize
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Jun 2014 09:58:30 +0000 (11:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 17 Aug 2014 21:25:24 +0000 (23:25 +0200)
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>
qom/object.c

index 0e8267bc2acc9d4ecb31344cbfb649a405d866f2..f301bc2abbbcb91ae0c3b10141ef3a52b17254e6 100644 (file)
@@ -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) {