diff options
| author | Techatrix <19954306+Techatrix@users.noreply.github.com> | 2022-08-17 21:28:11 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-17 19:05:39 -0400 |
| commit | 79757f233d9bfc646caa13d20243266a19bbdf91 (patch) | |
| tree | 52bc4cb8caf67fadbf20e0b6653ad8a99461f656 /lib | |
| parent | 7f0642b5d3c67f93892430f502f4eadbe54f1989 (diff) | |
| download | zig-79757f233d9bfc646caa13d20243266a19bbdf91.tar.gz zig-79757f233d9bfc646caa13d20243266a19bbdf91.zip | |
fix memory leak in NativePaths.zig
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/zig/system/NativePaths.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig index e9e7460314..5f52b04ce4 100644 --- a/lib/std/zig/system/NativePaths.zig +++ b/lib/std/zig/system/NativePaths.zig @@ -109,6 +109,8 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths if (native_target.os.tag != .windows) { const triple = try native_target.linuxTriple(allocator); + defer allocator.free(triple); + const qual = native_target.cpu.arch.ptrBitWidth(); // TODO: $ ld --verbose | grep SEARCH_DIR |
