]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr.c
spapr: fix potential memory leak in spapr_core_plug()
authorGreg Kurz <groug@kaod.org>
Wed, 12 Jul 2017 09:48:39 +0000 (11:48 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 17 Jul 2017 05:07:05 +0000 (15:07 +1000)
commite49c63d5b3234da0debf53cab7ee67de3a4a6a80
treeddc2c27105498331b3b367c3d8a93bb25751e461
parent67fea71bf3be579ad0be5abe34cd6fa1bc65ad5b
spapr: fix potential memory leak in spapr_core_plug()

Since commit 5c1da81215c7 ("spapr: Remove unnecessary differences between
hotplug and coldplug paths"), the CPU DT for the DRC is always allocated.
This causes a memory leak for pseries-2.6 and older machine types, that
don't support CPU hotplug and don't allocate DRCs for CPUs.

Reported-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c