Fix possible leak in recursive filepath.glob
This commit is contained in:
1 parent
f32e27d2e4
commit
35d818bb4e
1 file changed
+7
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user