qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 2/3] spapr: fix leak in h_client_architecture_supp


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH 2/3] spapr: fix leak in h_client_architecture_support()
Date: Wed, 13 Jun 2018 09:38:45 +1000
User-agent: Mutt/1.10.0 (2018-05-17)

On Tue, Jun 12, 2018 at 07:01:26PM +0200, Greg Kurz wrote:
> If the negotiated compat mode can't be set, but raw mode is supported,
> we decide to ignore the error. An so, we should free it to prevent a
> memory leak.
> 
> Signed-off-by: Greg Kurz <address@hidden>

Applied to ppc-for-3.0, thanks.

> ---
>  hw/ppc/spapr_hcall.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index 022f6d810182..8b9a4b577fbf 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -1547,6 +1547,7 @@ static target_ulong 
> h_client_architecture_support(PowerPCCPU *cpu,
>                  error_report_err(local_err);
>                  return H_HARDWARE;
>              }
> +            error_free(local_err);
>              local_err = NULL;
>          }
>      }
> 

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]