mem: Make small_stack_resize* free if size is 0

This commit is contained in:
Feoramund
2025-06-14 13:06:39 -04:00
parent a4771ce1b5
commit 3a02918efc

View File

@@ -1537,7 +1537,7 @@ small_stack_resize_bytes_non_zeroed :: proc(
return small_stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
}
if size == 0 {
return nil, nil
return nil, small_stack_free(s, old_memory, loc)
}
start := uintptr(raw_data(s.data))
end := start + uintptr(len(s.data))