From df32b5b46c03b6e2955af026074831eebd0e18d6 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Tue, 29 Mar 2022 16:13:17 +0200 Subject: [windows] Fix leak in `glob`. --- core/path/filepath/path.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/path/filepath/path.odin') 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 } -- cgit v1.2.3