From 3ee91845372ec5513812857c9ba069829eba0303 Mon Sep 17 00:00:00 2001 From: flysand7 Date: Mon, 1 Apr 2024 23:32:16 +1100 Subject: [PATCH] [core/os2]: Fix memory leak on read_entire_file --- core/os/os2/file_util.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/os/os2/file_util.odin b/core/os/os2/file_util.odin index bb3dfd9eb..0708f708e 100644 --- a/core/os/os2/file_util.odin +++ b/core/os/os2/file_util.odin @@ -117,7 +117,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d } } else { buffer: [1024]u8 - out_buffer := make([dynamic]u8) + out_buffer := make([dynamic]u8, 0, 0, allocator) total := 0 for { n: int = ---