mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
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>
This commit is contained in:
parent
33cbb2c546
commit
76a6e1cc7c
1 changed files with 1 additions and 1 deletions
|
@ -418,8 +418,8 @@ static void object_finalize(void *data)
|
||||||
Object *obj = data;
|
Object *obj = data;
|
||||||
TypeImpl *ti = obj->class->type;
|
TypeImpl *ti = obj->class->type;
|
||||||
|
|
||||||
object_deinit(obj, ti);
|
|
||||||
object_property_del_all(obj);
|
object_property_del_all(obj);
|
||||||
|
object_deinit(obj, ti);
|
||||||
|
|
||||||
g_assert(obj->ref == 0);
|
g_assert(obj->ref == 0);
|
||||||
if (obj->free) {
|
if (obj->free) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue