Message ID | 156335160761.82682.11912058325777251614.stgit@lep8c.aus.stglabs.ibm.com |
---|---|
State | New |
Headers | show |
Series | ppc: Fix some memory leaks | expand |
On Wed, 17 Jul 2019 03:20:31 -0500 Shivaprasad G Bhat <sbhat@linux.ibm.com> wrote: > Free all SpaprOptionVector local pointers after use. > > Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> > --- Reviewed-by: Greg Kurz <groug@kaod.org> > hw/ppc/spapr_hcall.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c > index 6808d4cda8..71cfe7c41d 100644 > --- a/hw/ppc/spapr_hcall.c > +++ b/hw/ppc/spapr_hcall.c > @@ -1612,6 +1612,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) { > @@ -1629,6 +1630,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. */ > >
On Wed, Jul 17, 2019 at 03:20:31AM -0500, Shivaprasad G Bhat wrote: > Free all SpaprOptionVector local pointers after use. > > Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> Applied to ppc-for-4.2, thanks. > --- > hw/ppc/spapr_hcall.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c > index 6808d4cda8..71cfe7c41d 100644 > --- a/hw/ppc/spapr_hcall.c > +++ b/hw/ppc/spapr_hcall.c > @@ -1612,6 +1612,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) { > @@ -1629,6 +1630,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. */ >
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 6808d4cda8..71cfe7c41d 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1612,6 +1612,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) { @@ -1629,6 +1630,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. */
Free all SpaprOptionVector local pointers after use. Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> --- hw/ppc/spapr_hcall.c | 2 ++ 1 file changed, 2 insertions(+)