From 67c1b364c4e6305a6c2dc0dbe25ff8da5b88909c Mon Sep 17 00:00:00 2001 From: sir-w7 Date: Wed, 21 Dec 2022 07:25:13 -0800 Subject: [PATCH] Fixed memory leak in dir_darwin.odin. --- core/os/dir_darwin.odin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/os/dir_darwin.odin b/core/os/dir_darwin.odin index 1f54ef1ab..7d0f2936d 100644 --- a/core/os/dir_darwin.odin +++ b/core/os/dir_darwin.odin @@ -14,11 +14,12 @@ read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []F dirpath: string dirpath, err = absolute_path_from_handle(fd) - if err != ERROR_NONE { return } + defer delete(dirpath) + n := n size := n if n <= 0 {