diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-03-29 16:13:17 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-03-29 16:13:17 +0200 |
| commit | df32b5b46c03b6e2955af026074831eebd0e18d6 (patch) | |
| tree | c7eafc02160b20ca0b38aa1fa7cc89dd466e3014 /core/path/filepath/path.odin | |
| parent | 085fa199eaf28b9544293a4ef1d2f8637e242af9 (diff) | |
[windows] Fix leak in `glob`.
Diffstat (limited to 'core/path/filepath/path.odin')
| -rw-r--r-- | core/path/filepath/path.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin index c04bd5a11..42714d736 100644 --- a/core/path/filepath/path.odin +++ b/core/path/filepath/path.odin @@ -122,6 +122,7 @@ clean :: proc(path: string, allocator := context.allocator) -> string { vol_and_path = original_path, vol_len = vol_len, } + defer lazy_buffer_destroy(out) r, dot_dot := 0, 0 if rooted { @@ -170,7 +171,6 @@ clean :: proc(path: string, allocator := context.allocator) -> string { cleaned, new_allocation := from_slash(s) if new_allocation { delete(s) - lazy_buffer_destroy(out) } return cleaned } |