rt: memory_region::free(NULL) shouldn't touch the live allocation count
This commit is contained in:
parent
4673eb6839
commit
02c0501a61
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue