aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-05-26 17:39:51 -0700
committerAndreas Färber <afaerber@suse.de>2014-06-30 21:13:30 +0200
commitd15ae221eada39949b025d641f82d2c4a2ad8dde (patch)
tree5d542dafe8a55f3a5103fab594168e92deacb30e
parent53a259da5697ec8a82463161e2e32ff942a08bc2 (diff)
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>
-rw-r--r--qom/object.c1
1 files changed, 1 insertions, 0 deletions
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);
}