aboutsummaryrefslogtreecommitdiff
path: root/core/path/filepath
diff options
context:
space:
mode:
Diffstat (limited to 'core/path/filepath')
-rw-r--r--core/path/filepath/match.odin7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/path/filepath/match.odin b/core/path/filepath/match.odin
index 7eb72b9a7..003f8046d 100644
--- a/core/path/filepath/match.odin
+++ b/core/path/filepath/match.odin
@@ -246,6 +246,13 @@ glob :: proc(pattern: string, allocator := context.allocator) -> (matches: []str
if err != .None {
return
}
+ defer {
+ for s in m {
+ delete(s)
+ }
+ delete(m)
+ }
+
dmatches := make([dynamic]string, 0, 0)
for d in m {
dmatches, err = _glob(d, file, &dmatches)