mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Fix possible leak in recursive filepath.glob
This commit is contained in:
@@ -246,6 +246,13 @@ glob :: proc(pattern: string, allocator := context.allocator) -> (matches: []str
|
|||||||
if err != .None {
|
if err != .None {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer {
|
||||||
|
for s in m {
|
||||||
|
delete(s)
|
||||||
|
}
|
||||||
|
delete(m)
|
||||||
|
}
|
||||||
|
|
||||||
dmatches := make([dynamic]string, 0, 0)
|
dmatches := make([dynamic]string, 0, 0)
|
||||||
for d in m {
|
for d in m {
|
||||||
dmatches, err = _glob(d, file, &dmatches)
|
dmatches, err = _glob(d, file, &dmatches)
|
||||||
|
|||||||
Reference in New Issue
Block a user