All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Cc: "patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH] hw/arm/iotkit.c: fix minor memory leak
Date: Tue, 8 May 2018 10:04:33 -0300	[thread overview]
Message-ID: <f01b4c93-efe1-572a-5e14-7d0ca3d40ac2@amsat.org> (raw)
In-Reply-To: <CAFEAcA-X1-D4G4KLmXrTpQ_Yz6O3Pyzj63ir3MjiR4ZkqOF=kw@mail.gmail.com>

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
> 

  reply	other threads:[~2018-05-08 13:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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é [this message]
2018-05-08 10:37 ` [Qemu-devel] " Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f01b4c93-efe1-572a-5e14-7d0ca3d40ac2@amsat.org \
    --to=f4bug@amsat.org \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.