mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Correct logic for tracking allocator proc for freeing a nil pointer
This commit is contained in:
@@ -858,7 +858,7 @@ tracking_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
|||||||
|
|
||||||
result: []byte
|
result: []byte
|
||||||
err: Allocator_Error
|
err: Allocator_Error
|
||||||
if mode == .Free && old_memory not_in data.allocation_map {
|
if mode == .Free && old_memory != nil && old_memory not_in data.allocation_map {
|
||||||
append(&data.bad_free_array, Tracking_Allocator_Bad_Free_Entry{
|
append(&data.bad_free_array, Tracking_Allocator_Bad_Free_Entry{
|
||||||
memory = old_memory,
|
memory = old_memory,
|
||||||
location = loc,
|
location = loc,
|
||||||
|
|||||||
Reference in New Issue
Block a user