aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index be69c7f346..9ce65fc3dd 100644
--- a/vl.c
+++ b/vl.c
@@ -2935,14 +2935,15 @@ static int object_create(QemuOpts *opts, void *opaque)
goto out;
}
+ object_property_add_child(container_get(object_get_root(), "/objects"),
+ id, obj, &local_err);
+
user_creatable_complete(obj, &local_err);
if (local_err) {
+ object_property_del(container_get(object_get_root(), "/objects"),
+ id, &error_abort);
goto out;
}
-
- object_property_add_child(container_get(object_get_root(), "/objects"),
- id, obj, &local_err);
-
out:
object_unref(obj);
if (local_err) {