From 7081e9b6b2d695c4367e6b9ed3e852bcb6f42907 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 14 Dec 2018 13:30:54 +0000 Subject: [PATCH] hw/arm/mps2-tz.c: Free mscname string in make_dma() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The clang leak sanitizer spots a (one-off, trivial) memory leak in make_dma() due to a missing free. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181204132952.2601-3-peter.maydell@linaro.org --- 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 6dd02ae47e..82b1d020a5 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); }