From 33644546a0c17e48f0a3f7b59d9bd0a749666173 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 4 Nov 2023 21:59:35 -0700 Subject: [PATCH] Sema: fix memory leak in zirTypeInfo --- src/Sema.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sema.zig b/src/Sema.zig index 5dec7cf0a8..a90e55550b 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -17627,7 +17627,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai const name = if (struct_type.fieldName(ip, i).unwrap()) |name_nts| try sema.arena.dupe(u8, ip.stringToSlice(name_nts)) else - try std.fmt.allocPrintZ(gpa, "{d}", .{i}); + try std.fmt.allocPrintZ(sema.arena, "{d}", .{i}); const field_ty = struct_type.field_types.get(ip)[i].toType(); const field_init = struct_type.fieldInit(ip, i); const field_is_comptime = struct_type.fieldIsComptime(ip, i);