aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPanNengyuan <pannengyuan@huawei.com>2019-11-19 15:12:09 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-12-16 10:46:34 +0000
commit15cea92d9e8afd4472147e54efe2eef0b7754dcd (patch)
tree2f2b29c091ea0edbb9d9663ec794e18d61f79b5e /hw
parent63ceb818a43391f6631efeb51fe6e0029c582497 (diff)
downloadqemu-15cea92d9e8afd4472147e54efe2eef0b7754dcd.zip
qemu-15cea92d9e8afd4472147e54efe2eef0b7754dcd.tar.gz
qemu-15cea92d9e8afd4472147e54efe2eef0b7754dcd.tar.bz2
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/gpio/aspeed_gpio.c1
1 files changed, 1 insertions, 0 deletions
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);
}
}