]> Git Repo - qemu.git/commit - hw/ppc/spapr.c
hw/ppc: Use object_initialize_child for correct reference counting
authorThomas Huth <[email protected]>
Thu, 21 Feb 2019 11:24:48 +0000 (12:24 +0100)
committerDavid Gibson <[email protected]>
Mon, 25 Feb 2019 22:21:25 +0000 (09:21 +1100)
commitf6d4dca807d853516fc307519f3260a432818bdc
tree1ca500b13c49f523960e76be2bf1c6063c121238
parent3dbe65c17890e4beefe9812590c723e17e611852
hw/ppc: Use object_initialize_child for correct reference counting

Both functions, object_initialize() and object_property_add_child() increase
the reference counter of the new object, so one of the references has to be
dropped afterwards to get the reference counting right. Otherwise the child
object will not be properly cleaned up when the parent gets destroyed.
Thus let's use now object_initialize_child() instead to get the reference
counting here right.

Suggested-by: Eduardo Habkost <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <1550748288[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Signed-off-by: David Gibson <[email protected]>
hw/intc/spapr_xive.c
hw/ppc/pnv.c
hw/ppc/pnv_psi.c
hw/ppc/spapr.c
This page took 0.02783 seconds and 4 git commands to generate.