diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-05-10 18:10:56 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-05-10 18:10:56 +0100 |
commit | 7a35383afd66458ff11fa5c72a1599f3a24f3073 (patch) | |
tree | 1689892e26baca162177d0ed649f0371b7bd334a /hw | |
parent | e5cd695266c5709308aa95b1baae499e4b5d4544 (diff) |
hw/arm/iotkit.c: fix minor memory leak
Coverity (CID1390573) spots that we forgot to free the
gpioname strings in a loop in the iotkit realize function.
Correct the error.
This isn't a significant leak, because this function
only ever runs once.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-id: 20180427110137.19304-1-peter.maydell@linaro.org
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/iotkit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/arm/iotkit.c b/hw/arm/iotkit.c index c5f0a5b98a..234185e8f7 100644 --- a/hw/arm/iotkit.c +++ b/hw/arm/iotkit.c @@ -517,6 +517,7 @@ static void iotkit_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in(DEVICE(&s->ppc_irq_orgate), i)); qdev_connect_gpio_out_named(DEVICE(ppc), "irq", 0, qdev_get_gpio_in(devs, 0)); + g_free(gpioname); } iotkit_forward_sec_resp_cfg(s); |