summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--qom/object.c5
1 files changed, 4 insertions, 1 deletions
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;
+                }
             }
         }
     }