Commit 3e1df4cc authored by Markus Armbruster's avatar Markus Armbruster
Browse files

mips/boston: Plug memory leak in boston_mach_init()



Fixes: df1d8a1f
Cc: Paul Burton <pburton@wavecomp.com>
Cc: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Message-Id: <20200505101908.6207-9-armbru@redhat.com>
Reviewed-by: default avatarAleksandar Markovic <aleksandar.qemu.devel@gmail.com>
parent 932d3a65
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -426,7 +426,6 @@ static void boston_mach_init(MachineState *machine)
{
    DeviceState *dev;
    BostonState *s;
    Error *err = NULL;
    MemoryRegion *flash, *ddr_low_alias, *lcd, *platreg;
    MemoryRegion *sys_mem = get_system_memory();
    XilinxPCIEHost *pcie2;
@@ -467,7 +466,8 @@ static void boston_mach_init(MachineState *machine)
    sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1);

    flash =  g_new(MemoryRegion, 1);
    memory_region_init_rom(flash, NULL, "boston.flash", 128 * MiB, &err);
    memory_region_init_rom(flash, NULL, "boston.flash", 128 * MiB,
                           &error_fatal);
    memory_region_add_subregion_overlap(sys_mem, 0x18000000, flash, 0);

    memory_region_add_subregion_overlap(sys_mem, 0x80000000, machine->ram, 0);