From 36a0f43dc2c2cce7098c56f396cbcc9fdaef2ab0 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 8 Jan 2018 23:49:48 -0800 Subject: [PATCH] GBA Memory: Fix copy-on-write memory leak --- CHANGES | 1 + src/gba/memory.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index e770d2001..d42fb845e 100644 --- a/CHANGES +++ b/CHANGES @@ -37,6 +37,7 @@ Bugfixes: - GBA Audio: Increase PSG volume (fixes mgba.io/i/932) - 3DS: Fix opening files in directory names with trailing slashes - GB MBC: Fix MBC2 saves (fixes mgba.io/i/954) + - GBA Memory: Fix copy-on-write memory leak Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722) diff --git a/src/gba/memory.c b/src/gba/memory.c index fa989d397..4829ce23e 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -1635,6 +1635,7 @@ void _pristineCow(struct GBA* gba) { } gba->memory.rom = newRom; gba->memory.hw.gpioBase = &((uint16_t*) gba->memory.rom)[GPIO_REG_DATA >> 1]; + gba->isPristine = false; } void GBAPrintFlush(struct GBA* gba) {