On Tue, Jul 25, 2017 at 08:00:09PM +0200, Greg Kurz wrote:
> From: Michael Roth <mdr...@linux.vnet.ibm.com>
> 
> 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 <mdr...@linux.vnet.ibm.com>
> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>
> Reviewed-by: David Gibson <da...@gibson.dropbear.id.au>
> Signed-off-by: Greg Kurz <gr...@kaod.org>

Applied to ppc-for-2.11.

> ---
> Changes since RFC:
> - s/DRC/TCE table/ in changelog
> ---
>  hw/ppc/spapr_iommu.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
> index d4eca2a77225..8ec4e7a40834 100644
> --- a/hw/ppc/spapr_iommu.c
> +++ b/hw/ppc/spapr_iommu.c
> @@ -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);
>  
> 

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature

Reply via email to