[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [for-2.11 PATCH 09/26] spapr_drc: pass object ownership to

From: Greg Kurz
Subject: [Qemu-devel] [for-2.11 PATCH 09/26] spapr_drc: pass object ownership to parent/owner
Date: Tue, 25 Jul 2017 19:59:56 +0200
User-agent: StGit/0.17.1-20-gc0b1b-dirty

From: Michael Roth <address@hidden>

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 <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Changes since RFC:
- rebased against ppc-for-2.10
 hw/ppc/spapr_drc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 105ce85b6d04..eb8024d37c54 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -544,6 +544,7 @@ sPAPRDRConnector *spapr_dr_connector_new(Object *owner, 
const char *type,
     prop_name = g_strdup_printf("dr-connector[%"PRIu32"]",
     object_property_add_child(owner, prop_name, OBJECT(drc), NULL);
+    object_unref(OBJECT(drc));
     object_property_set_bool(OBJECT(drc), true, "realized", NULL);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]