mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-22 00:43:26 +02:00
Fix memory leak
This commit is contained in:
@@ -126,6 +126,11 @@ void GB_configure_cart(GB_gameboy_t *gb)
|
||||
GB_log(gb, "Cartridge type %02x is not yet supported.\n", gb->rom[0x147]);
|
||||
}
|
||||
|
||||
if (gb->mbc_ram) {
|
||||
free(gb->mbc_ram);
|
||||
gb->mbc_ram = NULL;
|
||||
}
|
||||
|
||||
if (gb->cartridge_type->has_ram) {
|
||||
if (gb->cartridge_type->mbc_type == GB_MBC2) {
|
||||
gb->mbc_ram_size = 0x200;
|
||||
|
Reference in New Issue
Block a user