aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_hcall.c
diff options
context:
space:
mode:
authorShivaprasad G Bhat <sbhat@linux.ibm.com>2019-07-17 03:20:31 -0500
committerDavid Gibson <david@gibson.dropbear.id.au>2019-08-21 17:17:11 +1000
commit00005f222973d318a8a4d7bc7a15e251fb8cf604 (patch)
treedd4b77487488ab2fcb8f78c950d7e6b55d52abfc /hw/ppc/spapr_hcall.c
parentdbd26f2f7f589994aa2a2ec9740527a5bf201994 (diff)
downloadqemu-00005f222973d318a8a4d7bc7a15e251fb8cf604.zip
qemu-00005f222973d318a8a4d7bc7a15e251fb8cf604.tar.gz
qemu-00005f222973d318a8a4d7bc7a15e251fb8cf604.tar.bz2
ppc: fix leak in h_client_architecture_support
Free all SpaprOptionVector local pointers after use. Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> Message-Id: <156335160761.82682.11912058325777251614.stgit@lep8c.aus.stglabs.ibm.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_hcall.c')
-rw-r--r--hw/ppc/spapr_hcall.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 225c60a..47b5668 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1613,6 +1613,7 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
ov5_updates = spapr_ovec_new();
spapr->cas_reboot = spapr_ovec_diff(ov5_updates,
ov5_cas_old, spapr->ov5_cas);
+ spapr_ovec_cleanup(ov5_cas_old);
/* Now that processing is finished, set the radix/hash bit for the
* guest if it requested a valid mode; otherwise terminate the boot. */
if (guest_radix) {
@@ -1630,6 +1631,7 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
}
spapr->cas_legacy_guest_workaround = !spapr_ovec_test(ov1_guest,
OV1_PPC_3_00);
+ spapr_ovec_cleanup(ov1_guest);
if (!spapr->cas_reboot) {
/* If spapr_machine_reset() did not set up a HPT but one is necessary
* (because the guest isn't going to use radix) then set it up here. */