summaryrefslogtreecommitdiffstats
path: root/hw/gpio
diff options
context:
space:
mode:
authorPanNengyuan2019-11-19 15:12:09 +0100
committerPeter Maydell2019-12-16 11:46:34 +0100
commit15cea92d9e8afd4472147e54efe2eef0b7754dcd (patch)
tree2f2b29c091ea0edbb9d9663ec794e18d61f79b5e /hw/gpio
parentaspeed: Add support for the tacoma-bmc board (diff)
downloadqemu-15cea92d9e8afd4472147e54efe2eef0b7754dcd.tar.gz
qemu-15cea92d9e8afd4472147e54efe2eef0b7754dcd.tar.xz
qemu-15cea92d9e8afd4472147e54efe2eef0b7754dcd.zip
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/gpio')
-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 7acc5fa8e2..41e11ea9b0 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);
}
}