diff options
author | Michael Roth <mdroth@linux.vnet.ibm.com> | 2017-07-25 19:59:56 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-09-08 09:30:54 +1000 |
commit | f3f41030346832af62737d69d15fd8d6dab9ba79 (patch) | |
tree | cf2b49c732572d2eedf08a6e8b7ba2cde32f8acb /hw/ppc/spapr_drc.c | |
parent | 379ae096f7ee7c8ae15886eeb4361008ac6ba1c4 (diff) |
spapr_drc: pass object ownership to parent/owner
DRC objects attach themselves to an owner as a child
property. unref afterward to allow them to be finalized
when their owner is finalized.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_drc.c')
-rw-r--r-- | hw/ppc/spapr_drc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index b10f849d37..915e9b51c4 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -548,6 +548,7 @@ sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type, prop_name = g_strdup_printf("dr-connector[%"PRIu32"]", spapr_drc_index(drc)); object_property_add_child(owner, prop_name, OBJECT(drc), &error_abort); + object_unref(OBJECT(drc)); object_property_set_bool(OBJECT(drc), true, "realized", NULL); g_free(prop_name); |