Remove force-free of "leaked" memory in mem_display_blocks
mem_display_blocks runs before global destructors, so it reports as leaked any memory which is managed by a global scope object with a destructor. If mem_display_blocks calls mem_free, and the destructor later calls mem_free, a double-free results, and usually leads to a crash. Even if the memory were actually leaked, freeing it does not help because the program will exit soon anyway. Reported-by: zico <https://github.com/dxx-rebirth/dxx-rebirth/issues/85>
This commit is contained in:
parent
d5b5846657
commit
513e7c05e9
|
@ -320,7 +320,6 @@ void mem_display_blocks()
|
|||
con_printf(CON_CRITICAL, "\nMEM_LEAKAGE: Memory block has not been freed." );
|
||||
PrintInfo( i );
|
||||
}
|
||||
mem_free( (void *)MallocBase[i] );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue