* [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init()
@ 2019-11-18 1:37 pannengyuan
2019-11-18 8:01 ` Cédric Le Goater
0 siblings, 1 reply; 2+ messages in thread
From: pannengyuan @ 2019-11-18 1:37 UTC (permalink / raw)
To: clg, peter.maydell, andrew, joel
Cc: PanNengyuan, qemu-arm, kenny.zhangjun, qemu-devel,
zhang.zhanghailiang
From: PanNengyuan <pannengyuan@huawei.com>
Address Sanitizer shows memory leak in hw/gpio/aspeed_gpio.c:875
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: PanNengyuan <pannengyuan@huawei.com>
---
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);
}
}
--
2.7.2.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init()
2019-11-18 1:37 [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init() pannengyuan
@ 2019-11-18 8:01 ` Cédric Le Goater
0 siblings, 0 replies; 2+ messages in thread
From: Cédric Le Goater @ 2019-11-18 8:01 UTC (permalink / raw)
To: pannengyuan, peter.maydell, andrew, joel
Cc: qemu-arm, kenny.zhangjun, qemu-devel, zhang.zhanghailiang
On 18/11/2019 02:37, pannengyuan@huawei.com wrote:
> From: PanNengyuan <pannengyuan@huawei.com>
>
> Address Sanitizer shows memory leak in hw/gpio/aspeed_gpio.c:875
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: PanNengyuan <pannengyuan@huawei.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
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);
> }
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-18 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-18 1:37 [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init() pannengyuan
2019-11-18 8:01 ` Cédric Le Goater
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).