* [Qemu-devel] [PATCH] hw/arm/iotkit.c: fix minor memory leak
@ 2018-04-27 11:01 Peter Maydell
2018-05-08 9:16 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-05-08 10:37 ` [Qemu-devel] " Peter Xu
0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2018-04-27 11:01 UTC (permalink / raw)
To: qemu-arm, qemu-devel; +Cc: patches
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>
---
hw/arm/iotkit.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-arm] [PATCH] hw/arm/iotkit.c: fix minor memory leak
2018-04-27 11:01 [Qemu-devel] [PATCH] hw/arm/iotkit.c: fix minor memory leak Peter Maydell
@ 2018-05-08 9:16 ` Peter Maydell
2018-05-08 13:04 ` Philippe Mathieu-Daudé
2018-05-08 10:37 ` [Qemu-devel] " Peter Xu
1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2018-05-08 9:16 UTC (permalink / raw)
To: qemu-arm, QEMU Developers; +Cc: patches
ping for review?
thanks
-- PMM
On 27 April 2018 at 12:01, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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>
> ---
> hw/arm/iotkit.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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);
> --
> 2.17.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/arm/iotkit.c: fix minor memory leak
2018-04-27 11:01 [Qemu-devel] [PATCH] hw/arm/iotkit.c: fix minor memory leak Peter Maydell
2018-05-08 9:16 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
@ 2018-05-08 10:37 ` Peter Xu
1 sibling, 0 replies; 4+ messages in thread
From: Peter Xu @ 2018-05-08 10:37 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, qemu-devel, patches
On Fri, Apr 27, 2018 at 12:01:37PM +0100, Peter Maydell wrote:
> 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>
I believe this even does not require ARM knowledges, so:
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> hw/arm/iotkit.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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);
> --
> 2.17.0
>
>
--
Peter Xu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-arm] [PATCH] hw/arm/iotkit.c: fix minor memory leak
2018-05-08 9:16 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
@ 2018-05-08 13:04 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-08 13:04 UTC (permalink / raw)
To: Peter Maydell, qemu-arm, QEMU Developers; +Cc: patches
On 05/08/2018 06:16 AM, Peter Maydell wrote:
> ping for review?
>
> thanks
> -- PMM
>
> On 27 April 2018 at 12:01, Peter Maydell <peter.maydell@linaro.org> wrote:
>> 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>
>> ---
>> hw/arm/iotkit.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> 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);
>> --
>> 2.17.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-08 13:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 11:01 [Qemu-devel] [PATCH] hw/arm/iotkit.c: fix minor memory leak Peter Maydell
2018-05-08 9:16 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-05-08 13:04 ` Philippe Mathieu-Daudé
2018-05-08 10:37 ` [Qemu-devel] " Peter Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.