mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Fixed memory leak in dir_darwin.odin.
This commit is contained in:
@@ -14,11 +14,12 @@ read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []F
|
|||||||
|
|
||||||
dirpath: string
|
dirpath: string
|
||||||
dirpath, err = absolute_path_from_handle(fd)
|
dirpath, err = absolute_path_from_handle(fd)
|
||||||
|
|
||||||
if err != ERROR_NONE {
|
if err != ERROR_NONE {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer delete(dirpath)
|
||||||
|
|
||||||
n := n
|
n := n
|
||||||
size := n
|
size := n
|
||||||
if n <= 0 {
|
if n <= 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user