From d15ae221eada39949b025d641f82d2c4a2ad8dde Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Mon, 26 May 2014 17:39:51 -0700 Subject: [PATCH] qom: Remove parent pointer when unparenting MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Andreas Färber --- qom/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/object.c b/qom/object.c index 3876618c2e..7cefdf2137 100644 --- a/qom/object.c +++ b/qom/object.c @@ -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); } -- 2.11.4.GIT