[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/29] hw/openrisc/pic_cpu.c: Fix memory leak spotte
From: |
Shannon Zhao |
Subject: |
[Qemu-devel] [PATCH 19/29] hw/openrisc/pic_cpu.c: Fix memory leak spotted by valgrind |
Date: |
Thu, 28 May 2015 20:08:42 +0800 |
From: Shannon Zhao <address@hidden>
valgrind complains about:
==2442== 256 bytes in 1 blocks are definitely lost in loss record 803 of 952
==2442== at 0x4C2845D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2442== by 0x1E22A7: malloc_and_trace (vl.c:2556)
==2442== by 0x64C770E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
==2442== by 0x22FF53: qemu_extend_irqs (irq.c:55)
==2442== by 0x22FFDF: qemu_allocate_irqs (irq.c:64)
==2442== by 0x1BCBBE: cpu_openrisc_pic_init (pic_cpu.c:55)
==2442== by 0x1BD3BA: openrisc_sim_init (openrisc_sim.c:121)
==2442== by 0x1E6672: main (vl.c:4249)
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
---
hw/openrisc/pic_cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/openrisc/pic_cpu.c b/hw/openrisc/pic_cpu.c
index 2af1d60..8347f5c 100644
--- a/hw/openrisc/pic_cpu.c
+++ b/hw/openrisc/pic_cpu.c
@@ -57,4 +57,5 @@ void cpu_openrisc_pic_init(OpenRISCCPU *cpu)
for (i = 0; i < NR_IRQS; i++) {
cpu->env.irq[i] = qi[i];
}
+ g_free(qi);
}
--
2.0.4
- [Qemu-devel] [PATCH 05/29] hw/isa/lpc_ich9.c: Fix memory leak spotted by valgrind, (continued)
- [Qemu-devel] [PATCH 05/29] hw/isa/lpc_ich9.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 10/29] hw/sparc/sun4m.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 08/29] hw/intc/exynos4210_gic.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 18/29] hw/m68k/mcf5206.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 17/29] hw/lm32/milkymist.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 16/29] hw/lm32/lm32_boards.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 12/29] hw/ppc/ppc440_bamboo.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 15/29] hw/mips/mips_jazz.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 07/29] hw/timer/arm_timer.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 13/29] hw/ppc/prep.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 19/29] hw/openrisc/pic_cpu.c: Fix memory leak spotted by valgrind,
Shannon Zhao <=
- [Qemu-devel] [PATCH 14/29] hw/mips/mips_int.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 11/29] hw/ppc/mac_oldworld.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 22/29] hw/alpha/typhoon.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 20/29] hw/unicore32/puv3.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 24/29] hw/arm/omap_sx1.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 21/29] hw/sh4/r2d.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 26/29] hw/arm/spitz.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28
- [Qemu-devel] [PATCH 25/29] hw/arm/palm.c: Fix memory leak spotted by valgrind, Shannon Zhao, 2015/05/28