Fixed memory leak in dir_darwin.odin.
This commit is contained in:
1 parent
0829ac30f7
commit
67c1b364c4
1 file changed
+2
-1
@@ -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