From 98be8d30aada1b3810d43af30e1ed5faaab17b18 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 206f877b2..a2fae41ec 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ Bugfixes: - GBA BIOS: Fix incorrect exit condition in LZ77 - 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: Improve multiboot image detection - GB MBC: Remove erroneous bank 0 wrapping diff --git a/src/gba/memory.c b/src/gba/memory.c index 2eedeb9dd..d6a8eccdb 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -1561,4 +1561,5 @@ 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; }