]> git.proxmox.com Git - mirror_qemu.git/commitdiff
spapr_iommu: pass object ownership to parent/owner
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 25 Jul 2017 18:00:09 +0000 (20:00 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Sep 2017 23:30:54 +0000 (09:30 +1000)
TCE table 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>
hw/ppc/spapr_iommu.c

index 84d03df5ef9cb0add2a11214a571c1c9a61fe7bd..25c5f6d79570467cb95e4e896aea40359dd20c23 100644 (file)
@@ -321,6 +321,7 @@ sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn)
     tmp = g_strdup_printf("tce-table-%x", liobn);
     object_property_add_child(OBJECT(owner), tmp, OBJECT(tcet), NULL);
     g_free(tmp);
+    object_unref(OBJECT(tcet));
 
     object_property_set_bool(OBJECT(tcet), true, "realized", NULL);