Fix possible leak in recursive filepath.glob

This commit is contained in:
gingerBill
2024-10-27 12:10:10 +00:00
parent f32e27d2e4
commit 35d818bb4e

View File

@@ -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)