Skip to content

Commit 79757f2

Browse files
Techatrixandrewrk
authored andcommitted
fix memory leak in NativePaths.zig
1 parent 7f0642b commit 79757f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/std/zig/system/NativePaths.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths
109109

110110
if (native_target.os.tag != .windows) {
111111
const triple = try native_target.linuxTriple(allocator);
112+
defer allocator.free(triple);
113+
112114
const qual = native_target.cpu.arch.ptrBitWidth();
113115

114116
// TODO: $ ld --verbose | grep SEARCH_DIR

0 commit comments

Comments
 (0)