qemu-devel
[Top][All Lists]
Advanced

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

Re: [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init()


From: Cédric Le Goater
Subject: Re: [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init()
Date: Mon, 18 Nov 2019 09:01:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 18/11/2019 02:37, address@hidden wrote:
> From: PanNengyuan <address@hidden>
> 
> Address Sanitizer shows memory leak in hw/gpio/aspeed_gpio.c:875
> 
> Reported-by: Euler Robot <address@hidden>
> Signed-off-by: PanNengyuan <address@hidden>

Reviewed-by: Cédric Le Goater <address@hidden> 

I will add this patch the series I am building for 5.0.

Thanks,

C.

> ---
>  hw/gpio/aspeed_gpio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
> index 7acc5fa..41e11ea 100644
> --- a/hw/gpio/aspeed_gpio.c
> +++ b/hw/gpio/aspeed_gpio.c
> @@ -876,6 +876,7 @@ static void aspeed_gpio_init(Object *obj)
>                                 pin_idx % GPIOS_PER_GROUP);
>          object_property_add(obj, name, "bool", aspeed_gpio_get_pin,
>                              aspeed_gpio_set_pin, NULL, NULL, NULL);
> +        g_free(name);
>      }
>  }
>  
> 




reply via email to

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