Mercurial > repos > blastem
diff genesis.c @ 1593:24508cb54f87
Fix a number of other memory errors (mostly leaks again) identified by valgrind
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 28 Jun 2018 09:27:05 -0700 |
parents | 31effaadf877 |
children | 360d5bab199f |
line wrap: on
line diff
--- a/genesis.c Fri Jun 22 23:10:27 2018 -0700 +++ b/genesis.c Thu Jun 28 09:27:05 2018 -0700 @@ -1188,7 +1188,9 @@ { genesis_context *gen = (genesis_context *)system; vdp_free(gen->vdp); + memmap_chunk *map = (memmap_chunk *)gen->m68k->options->gen.memmap; m68k_options_free(gen->m68k->options); + free(map);//needs to happen after m68k_options_free as that function uses the memory map free(gen->cart); free(gen->m68k); free(gen->work_ram);