From c28322d10cd5f0529605b48684d2b82c9eb9c020 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Mon, 26 May 2014 17:39:51 -0700 Subject: [PATCH] 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 Signed-off-by: Paolo Bonzini --- qom/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/object.c b/qom/object.c index f49335f0cf..d5de8f6062 100644 --- a/qom/object.c +++ b/qom/object.c @@ -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); } -- 2.30.2