mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-28 17:04:34 +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 {
|
||||
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