[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/30] hw/arm/omap_sx1.c: Fix memory leak spotted by
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 12/30] hw/arm/omap_sx1.c: Fix memory leak spotted by valgrind |
Date: |
Wed, 3 Jun 2015 16:08:32 +0300 |
From: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
hw/arm/omap_sx1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index 671e02c..4b0f7f9 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -103,7 +103,6 @@ static void sx1_init(MachineState *machine, const int
version)
struct omap_mpu_state_s *mpu;
MemoryRegion *address_space = get_system_memory();
MemoryRegion *flash = g_new(MemoryRegion, 1);
- MemoryRegion *flash_1 = g_new(MemoryRegion, 1);
MemoryRegion *cs = g_new(MemoryRegion, 4);
static uint32_t cs0val = 0x00213090;
static uint32_t cs1val = 0x00215070;
@@ -165,6 +164,7 @@ static void sx1_init(MachineState *machine, const int
version)
if ((version == 1) &&
(dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
+ MemoryRegion *flash_1 = g_new(MemoryRegion, 1);
memory_region_init_ram(flash_1, NULL, "omap_sx1.flash1-0", flash1_size,
&error_abort);
vmstate_register_ram_global(flash_1);
--
2.1.4
- [Qemu-devel] [PULL 18/30] hw/sparc/sun4m.c: Fix misusing qemu_allocate_irqs for single irq, (continued)
- [Qemu-devel] [PULL 18/30] hw/sparc/sun4m.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 20/30] hw/lm32/lm32_boards.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 30/30] configure: postfix --extra-cflags to QEMU_CFLAGS, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 23/30] hw/alpha/typhoon.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 13/30] hw/intc/exynos4210_gic.c: Fix memory leak by adjusting order, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 16/30] hw/isa/i82378.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 19/30] hw/ppc/prep.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 14/30] hw/i386/pc: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 01/30] iscsi: Remove pointless runtime check of macro value, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 27/30] translate-all: delete prototype for non-existent function, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 12/30] hw/arm/omap_sx1.c: Fix memory leak spotted by valgrind,
Michael Tokarev <=
- [Qemu-devel] [PULL 02/30] microblaze: cpu: Delete MMAP_SHIFT definition, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 21/30] hw/lm32/milkymist.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 11/30] hw/ppc/e500.c: Fix memory leak, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 09/30] vl: fix memory leak spotted by valgrind, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 26/30] Add -incoming help text, Michael Tokarev, 2015/06/03
- Re: [Qemu-devel] [PULL 00/30] Trivial patches for 2015-06-03, Peter Maydell, 2015/06/04