mirror of https://gitee.com/openkylin/qemu.git
gpio: fix memory leak in aspeed_gpio_init()
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> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-id: 20191119141211.25716-16-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
63ceb818a4
commit
15cea92d9e
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue