summaryrefslogtreecommitdiffstats
path: root/hw/intc/arm_gicv3_common.c
diff options
context:
space:
mode:
authorIgor Mammedov2017-02-28 13:08:15 +0100
committerPeter Maydell2017-02-28 13:08:15 +0100
commitdbb74759fae6f521709e16e19cbb7d6fb2307700 (patch)
treeb04dbc8f373c3194018a08915dd69c60b07cc0bd /hw/intc/arm_gicv3_common.c
parentsd: sdhci: Remove block count enable check in single block transfers (diff)
downloadqemu-dbb74759fae6f521709e16e19cbb7d6fb2307700.tar.gz
qemu-dbb74759fae6f521709e16e19cbb7d6fb2307700.tar.xz
qemu-dbb74759fae6f521709e16e19cbb7d6fb2307700.zip
hw/arm/virt: fix cpu object reference leak
object_new(FOO) returns an object with ref_cnt == 1 and following object_property_set_bool(cpuobj, true, "realized", NULL) set parent of cpuobj to '/machine/unattached' which makes ref_cnt == 2. Since machvirt_init() doesn't take ownership of cpuobj returned by object_new() it should explicitly drop reference to cpuobj when dangling pointer is about to go out of scope like it's done pc_new_cpu() to avoid object leak. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-id: 1487253461-269218-1-git-send-email-imammedo@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc/arm_gicv3_common.c')
0 files changed, 0 insertions, 0 deletions