diff options
| -rw-r--r-- | core/path/filepath/path.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin index eed257f97..96f7cb7d0 100644 --- a/core/path/filepath/path.odin +++ b/core/path/filepath/path.odin @@ -169,7 +169,8 @@ clean :: proc(path: string, allocator := context.allocator) -> string { s := lazy_buffer_string(out); cleaned, new_allocation := from_slash(s); if new_allocation { - lazy_buffer_destroy(s); + delete(s); + lazy_buffer_destroy(out); } return cleaned; } @@ -398,6 +399,6 @@ lazy_buffer_string :: proc(lb: ^Lazy_Buffer) -> string { @(private) lazy_buffer_destroy :: proc(lb: ^Lazy_Buffer) { delete(lb.b); - delete(lb); + free(lb); lb^ = {}; } |