aboutsummaryrefslogtreecommitdiff
path: root/qom/object_interfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r--qom/object_interfaces.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 15fff66c3c..e8e1523960 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -83,8 +83,11 @@ Object *user_creatable_add_type(const char *type, const char *id,
}
if (id != NULL) {
- object_property_add_child(object_get_objects_root(),
- id, obj);
+ object_property_try_add_child(object_get_objects_root(),
+ id, obj, &local_err);
+ if (local_err) {
+ goto out;
+ }
}
if (!user_creatable_complete(USER_CREATABLE(obj), &local_err)) {