[DYNAREC] Fix a bug when freeing a large dynablock allocation

This commit is contained in:
ptitSeb 2021-01-21 18:35:21 +01:00
parent 02423d4a2d
commit 8209cf8398

View File

@ -421,8 +421,8 @@ uintptr_t AllocDynarecMap(dynablock_t* db, int size)
void FreeDynarecMap(dynablock_t* db, uintptr_t addr, uint32_t size)
{
if(size>MMAPSIZE) {
munmap((void*)addr, size);
if(size>MMAPSIZE-2*sizeof(blockmark_t)) {
free((void*)addr);
kh_dynablocks_t *blocks = dblist_oversized;
if(blocks) {
khint_t k = kh_get(dynablocks, blocks, (uintptr_t)db);