hw/m68k/mcf5206: Don't leak IRQs in mcf5206_mbar_realize()
commitb0bed2c916286326b248da05b2ca5f6d152aba44
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 20 Nov 2020 17:23:14 +0000 (20 17:23 +0000)
committerThomas Huth <thuth@redhat.com>
Wed, 9 Dec 2020 07:04:34 +0000 (9 08:04 +0100)
tree856eb074200d9d1bc129a6efefaf5f947b4dd8c7
parentd1a8b308a4ceb1071683bfcee22bd646b251f4a0
hw/m68k/mcf5206: Don't leak IRQs in mcf5206_mbar_realize()

Coverity points out that the realize function for the TYPE_MCF5206_MBAR
device leaks the IRQ array it allocates with qemu_allocate_irqs().
Keep a pointer to it in the device state struct to avoid the leak.
(Since it needs to stay around for the life of the simulation there
is no need to actually free it, and the leak was harmless.)

Fixes: Coverity CID 1432412
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201120172314.14725-1-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/m68k/mcf5206.c