rt: memory_region::free(NULL) shouldn't touch the live allocation count
This commit is contained in:
parent
4673eb6839
commit
02c0501a61
@ -21,6 +21,7 @@ memory_region::memory_region(memory_region *parent) :
|
||||
|
||||
void memory_region::free(void *mem) {
|
||||
// printf("free: ptr 0x%" PRIxPTR"\n", (uintptr_t) mem);
|
||||
if (!mem) { return; }
|
||||
if (_synchronized) { _lock.lock(); }
|
||||
#ifdef TRACK_ALLOCATIONS
|
||||
if (_allocation_list.replace(mem, NULL) == false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user