diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-06-14 13:06:39 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-06-15 12:34:15 -0400 |
| commit | 3a02918efc2cd038bb51c0b3623865cc57d2fa0f (patch) | |
| tree | e10c3dc105399c5c734b493419850ae90cbec26f /core | |
| parent | a4771ce1b584cb426dd20f7f11e3148157b3ebb2 (diff) | |
mem: Make `small_stack_resize*` free if `size` is 0
Diffstat (limited to 'core')
| -rw-r--r-- | core/mem/allocators.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin index dd5575c37..30c2589e7 100644 --- a/core/mem/allocators.odin +++ b/core/mem/allocators.odin @@ -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)) |