projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f7bd82
)
qom: do nothing on unparent of object without parent
author
Paolo Bonzini
<pbonzini@redhat.com>
Tue, 2 Apr 2013 13:50:00 +0000
(15:50 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Tue, 16 Apr 2013 21:10:21 +0000
(16:10 -0500)
Otherwise, device_unparent will fail to get a canonical path of
the object.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1364910600
-3418-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom/object.c
patch
|
blob
|
history
diff --git
a/qom/object.c
b/qom/object.c
index 881814943bbd165d5dee301b967f93828a1d7e0b..093502e5099315ddcfd431ae94779cb896301461 100644
(file)
--- a/
qom/object.c
+++ b/
qom/object.c
@@
-362,6
+362,10
@@
static void object_property_del_child(Object *obj, Object *child, Error **errp)
void object_unparent(Object *obj)
{
+ if (!obj->parent) {
+ return;
+ }
+
object_ref(obj);
if (obj->class->unparent) {
(obj->class->unparent)(obj);