summaryrefslogtreecommitdiffstats
path: root/scripts/qapi
diff options
context:
space:
mode:
authorPeter Maydell2018-12-14 14:30:54 +0100
committerPeter Maydell2018-12-14 14:30:54 +0100
commitc0983085d127b1efb287337de26679c051abda07 (patch)
treec1e65a55d8caf91b6a8e471164b4e4f9c9a93579 /scripts/qapi
parenthw/arm/mps2-tz.c: Free mscname string in make_dma() (diff)
downloadqemu-c0983085d127b1efb287337de26679c051abda07.tar.gz
qemu-c0983085d127b1efb287337de26679c051abda07.tar.xz
qemu-c0983085d127b1efb287337de26679c051abda07.zip
hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize()
In sdhci_sysbus_realize() we override the initialization of s->iomem that sdhci_common_realize() performs. However we don't destroy the old memory region before reinitializing it, which means that the memory allocated for mr->name in memory_region_do_init() is leaked. Since sdhci_initfn() already initializes s->io_ops to &sdhci_mmio_ops, always use that in sdhci_common_realize() and remove the now-unnecessary reinitialization of the MMIO region from sdhci_sysbus_realize(). Spotted by clang's leak sanitizer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20181204132952.2601-4-peter.maydell@linaro.org
Diffstat (limited to 'scripts/qapi')
0 files changed, 0 insertions, 0 deletions