diff options
Diffstat (limited to 'qom/object.c')
-rw-r--r-- | qom/object.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qom/object.c b/qom/object.c index aa037d2..39cbcb9 100644 --- a/qom/object.c +++ b/qom/object.c @@ -304,12 +304,9 @@ static void object_property_del_child(Object *obj, Object *child, Error **errp) ObjectProperty *prop; QTAILQ_FOREACH(prop, &obj->properties, node) { - if (!strstart(prop->type, "child<", NULL)) { - continue; - } - - if (prop->opaque == child) { + if (strstart(prop->type, "child<", NULL) && prop->opaque == child) { object_property_del(obj, prop->name, errp); + break; } } } |