mirror of https://github.com/xemu-project/xemu.git
qom: object: remove parent pointer when unparenting
Certain parts of the QOM framework test this pointer to determine if an object is parented. Nuke it when the object is unparented to allow for reuse of an object after unparenting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
654a36d857
commit
c28322d10c
|
@ -397,6 +397,7 @@ void object_unparent(Object *obj)
|
|||
}
|
||||
if (obj->parent) {
|
||||
object_property_del_child(obj->parent, obj, NULL);
|
||||
obj->parent = NULL;
|
||||
}
|
||||
object_unref(obj);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue