qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 5/8] mips: fix memory leaks in board initialization


From: Thomas Huth
Subject: Re: [PATCH 5/8] mips: fix memory leaks in board initialization
Date: Tue, 1 Oct 2019 16:34:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 01/10/2019 15.36, Paolo Bonzini wrote:
> They are not a big deal, but they upset asan.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  hw/mips/mips_int.c  | 1 +
>  hw/mips/mips_jazz.c | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
> index 5ebc961..863ed45 100644
> --- a/hw/mips/mips_int.c
> +++ b/hw/mips/mips_int.c
> @@ -81,6 +81,7 @@ void cpu_mips_irq_init_cpu(MIPSCPU *cpu)
>      for (i = 0; i < 8; i++) {
>          env->irq[i] = qi[i];
>      }
> +    g_free(qi);
>  }
>  
>  void cpu_mips_soft_irq(CPUMIPSState *env, int irq, int level)
> diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
> index c967b97..8d010a0 100644
> --- a/hw/mips/mips_jazz.c
> +++ b/hw/mips/mips_jazz.c
> @@ -362,6 +362,8 @@ static void mips_jazz_init(MachineState *machine,
>  
>      /* LED indicator */
>      sysbus_create_simple("jazz-led", 0x8000f000, NULL);
> +
> +    g_free(dmas);
>  }
>  
>  static
> 

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

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