mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
commit
133fe77437
45 changed files with 405 additions and 155 deletions
11
qom/object.c
11
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue