[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/17] gpio: fix memory leak in aspeed_gpio_init()
From: |
Cédric Le Goater |
Subject: |
[PATCH 15/17] gpio: fix memory leak in aspeed_gpio_init() |
Date: |
Tue, 19 Nov 2019 15:12:09 +0100 |
From: PanNengyuan <address@hidden>
Address Sanitizer shows memory leak in hw/gpio/aspeed_gpio.c:875
Reported-by: Euler Robot <address@hidden>
Signed-off-by: PanNengyuan <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
---
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 7acc5fa8e29a..41e11ea9b04d 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.21.0
- [PATCH 05/17] aspeed/i2c: Add trace events, (continued)
- [PATCH 05/17] aspeed/i2c: Add trace events, Cédric Le Goater, 2019/11/19
- [PATCH 06/17] aspeed/sdmc: Make ast2600 default 1G, Cédric Le Goater, 2019/11/19
- [PATCH 07/17] aspeed/scu: Fix W1C behavior, Cédric Le Goater, 2019/11/19
- [PATCH 08/17] watchdog/aspeed: Improve watchdog timeout message, Cédric Le Goater, 2019/11/19
- [PATCH 09/17] watchdog/aspeed: Fix AST2600 frequency behaviour, Cédric Le Goater, 2019/11/19
- [PATCH 10/17] aspeed/smc: Restore default AHB window mapping at reset, Cédric Le Goater, 2019/11/19
- [PATCH 11/17] aspeed/smc: Do not map disabled segment on the AST2600, Cédric Le Goater, 2019/11/19
- [PATCH 12/17] aspeed/smc: Add AST2600 timings registers, Cédric Le Goater, 2019/11/19
- [PATCH 13/17] aspeed: Remove AspeedBoardConfig array and use AspeedMachineClass, Cédric Le Goater, 2019/11/19
- [PATCH 14/17] aspeed: Add support for the tacoma-bmc board, Cédric Le Goater, 2019/11/19
- [PATCH 15/17] gpio: fix memory leak in aspeed_gpio_init(),
Cédric Le Goater <=
- [PATCH 16/17] aspeed: Change the "scu" property definition, Cédric Le Goater, 2019/11/19
- [PATCH 17/17] aspeed: Change the "nic" property definition, Cédric Le Goater, 2019/11/19