diff options
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qom/object.c b/qom/object.c index 79bd0cc474..a298b32f8b 100644 --- a/qom/object.c +++ b/qom/object.c @@ -668,10 +668,10 @@ void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque), int object_child_foreach(Object *obj, int (*fn)(Object *child, void *opaque), void *opaque) { - ObjectProperty *prop; + ObjectProperty *prop, *next; int ret = 0; - QTAILQ_FOREACH(prop, &obj->properties, node) { + QTAILQ_FOREACH_SAFE(prop, &obj->properties, node, next) { if (object_property_is_child(prop)) { ret = fn(prop->opaque, opaque); if (ret != 0) { |