diff --git a/qom/object.c b/qom/object.c index d0be42c8d6..484465f1c8 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1051,7 +1051,10 @@ static int do_object_child_foreach(Object *obj, break; } if (recurse) { - do_object_child_foreach(child, fn, opaque, true); + ret = do_object_child_foreach(child, fn, opaque, true); + if (ret != 0) { + break; + } } } }