diff options
author | PanNengyuan <pannengyuan@huawei.com> | 2019-11-19 15:12:09 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-12-16 10:46:34 +0000 |
commit | 15cea92d9e8afd4472147e54efe2eef0b7754dcd (patch) | |
tree | 2f2b29c091ea0edbb9d9663ec794e18d61f79b5e /hw/gpio | |
parent | 63ceb818a43391f6631efeb51fe6e0029c582497 (diff) | |
download | qemu-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/gpio')
-rw-r--r-- | hw/gpio/aspeed_gpio.c | 1 |
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); } } |