mirror of https://gitee.com/openkylin/qemu.git
qom: 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: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
53a259da56
commit
d15ae221ea
|
@ -402,6 +402,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