[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 15/22] hw/ppc/mac_newworld: Free openpic_irqs array aft
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 15/22] hw/ppc/mac_newworld: Free openpic_irqs array after use |
Date: |
Thu, 8 Nov 2018 23:16:39 +1100 |
From: Peter Maydell <address@hidden>
In ppc_core99_init(), we allocate an openpic_irqs array, which
we then use to collect up the various qemu_irqs which we're
going to connect to the interrupt controller. Once we've
called sysbus_connect_irq() to connect them all up, the
array is no longer required, but we forgot to free it.
Since board init is only run once at startup, the memory
leak is not a significant one.
Spotted by Coverity: CID 1192916.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/mac_newworld.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index a630cb81cd..14273a123e 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -303,6 +303,7 @@ static void ppc_core99_init(MachineState *machine)
sysbus_connect_irq(s, k++, openpic_irqs[i][j]);
}
}
+ g_free(openpic_irqs);
if (PPC_INPUT(env) == PPC_FLAGS_INPUT_970) {
/* 970 gets a U3 bus */
--
2.19.1
- [Qemu-ppc] [PULL 05/22] hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c, (continued)
- [Qemu-ppc] [PULL 05/22] hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 18/22] MAINTAINERS: PPC: Remove myself, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 22/22] ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 12/22] target/ppc: Split out float_invalid_cvt, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 06/22] target/ppc: Split up float_invalid_op_excp, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 01/22] target/ppc: add external PID support, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 07/22] target/ppc: Remove float_check_status, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 15/22] hw/ppc/mac_newworld: Free openpic_irqs array after use,
David Gibson <=
- [Qemu-ppc] [PULL 14/22] macio/pmu: Fix missing vmsd terminator, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 16/22] target/ppc: fix mtmsr instruction for icount, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 21/22] target/ppc: Add one reg id for ptcr, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 17/22] ppc/pnv: check size before data buffer access, David Gibson, 2018/11/08
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/22] ppc-for-3.1 queue 20181108, Eric Blake, 2018/11/08