[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in ma
From: |
Philippe Mathieu-Daudé |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
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 <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> 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);
> }
>
>
- [Qemu-devel] [PATCH 0/5] arm: five simple memory leak fixes, Peter Maydell, 2018/12/04
- [Qemu-devel] [PATCH 4/5] tests/test-arm-mptimer: Don't leak string memory, Peter Maydell, 2018/12/04
- [Qemu-devel] [PATCH 5/5] target/arm: Create timers in realize, not init, Peter Maydell, 2018/12/04
- [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma(), Peter Maydell, 2018/12/04
- [Qemu-devel] [PATCH 3/5] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize(), Peter Maydell, 2018/12/04
- [Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries, Peter Maydell, 2018/12/04