From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma()
Date: Tue, 4 Dec 2018 15:26:42 +0100 [thread overview]
Message-ID: <2ca111ab-6374-2a53-5290-e48d535939ae@redhat.com> (raw)
In-Reply-To: <20181204132952.2601-3-peter.maydell@linaro.org>
On 4/12/18 14:29, Peter Maydell wrote:
> The clang leak sanitizer spots a (one-off, trivial) memory
> leak in make_dma() due to a missing free.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/arm/mps2-tz.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
> index 6dd02ae47e8..82b1d020a58 100644
> --- a/hw/arm/mps2-tz.c
> +++ b/hw/arm/mps2-tz.c
> @@ -322,6 +322,7 @@ static MemoryRegion *make_dma(MPS2TZMachineState *mms, void *opaque,
> sysbus_connect_irq(s, 2, qdev_get_gpio_in_named(iotkitdev,
> "EXP_IRQ", 57 + i * 3));
>
> + g_free(mscname);
> return sysbus_mmio_get_region(s, 0);
> }
>
>
next prev parent reply other threads:[~2018-12-04 14:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 13:29 [Qemu-devel] [PATCH 0/5] arm: five simple memory leak fixes Peter Maydell
2018-12-04 13:29 ` [Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries Peter Maydell
2018-12-04 13:57 ` Richard Henderson
2018-12-04 14:25 ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma() Peter Maydell
2018-12-04 13:57 ` Richard Henderson
2018-12-04 14:26 ` Philippe Mathieu-Daudé [this message]
2018-12-04 13:29 ` [Qemu-devel] [PATCH 3/5] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() Peter Maydell
2018-12-04 13:58 ` Richard Henderson
2018-12-04 14:29 ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 4/5] tests/test-arm-mptimer: Don't leak string memory Peter Maydell
2018-12-04 14:00 ` Richard Henderson
2018-12-04 17:08 ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 5/5] target/arm: Create timers in realize, not init Peter Maydell
2018-12-04 14:01 ` Richard Henderson
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=2ca111ab-6374-2a53-5290-e48d535939ae@redhat.com \
--to=philmd@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).