aboutsummaryrefslogtreecommitdiff
path: root/core/path/filepath/path.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/path/filepath/path.odin')
-rw-r--r--core/path/filepath/path.odin2
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
}