diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-01-14 12:09:59 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-01-14 12:10:08 +1000 |
commit | 133fe77437d3a23bf1fd70a231b4f29d5fa0571c (patch) | |
tree | 89450efd322bd414e941e30dfc991652892e4a3e /qom | |
parent | 73c694565c6144e0c4e15041b5250a04a25107c3 (diff) | |
parent | c950114286ea358a93ce632db0421945e1008395 (diff) |
Merge remote branch 'luiz/queue/qmp' into qmpq
* luiz/queue/qmp:
migration: qmp_migrate(): keep working after syntax error
qerror: Remove assert_no_error()
qemu-option: Remove qemu_opts_create_nofail
target-i386: Remove assert_no_error usage
hw: Remove assert_no_error usages
qdev: Delete dead code
error: Add error_abort
monitor: add object-add (QMP) and object_add (HMP) command
monitor: add object-del (QMP) and object_del (HMP) command
qom: catch errors in object_property_add_child
qom: fix leak for objects created with -object
rng: initialize file descriptor to -1
qemu-monitor: HMP cpu-add wrapper
vl: add missing transition debug->finish_migrate
Message-Id: 1389045795-18706-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qom/object.c b/qom/object.c index 2aab30b32f..62e7e415d9 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1004,17 +1004,22 @@ static void object_finalize_child_property(Object *obj, const char *name, void object_property_add_child(Object *obj, const char *name, Object *child, Error **errp) { + Error *local_err = NULL; gchar *type; type = g_strdup_printf("child<%s>", object_get_typename(OBJECT(child))); - object_property_add(obj, name, type, object_get_child_property, - NULL, object_finalize_child_property, child, errp); - + object_property_add(obj, name, type, object_get_child_property, NULL, + object_finalize_child_property, child, &local_err); + if (local_err) { + error_propagate(errp, local_err); + goto out; + } object_ref(child); g_assert(child->parent == NULL); child->parent = obj; +out: g_free(type); } |