From c7db89a3147ede21ac821e53fa28a2d1ef98dc19 Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Wed, 25 Mar 2026 23:45:38 -0400 Subject: [PATCH] double free. whoops. --- src/main.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.zig b/src/main.zig index 065787b..255e78f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1096,7 +1096,6 @@ pub fn main() !void { latest.info.counter = 1; } defer for (state.custom_info.items) |*item| { - state.allocator.free(item.lbl.text); item.lbl.deinit(); }; @@ -1788,7 +1787,7 @@ fn updateCustomInfo(lbl: *Label, ptr: *anyopaque) !void { try stdout.print(state.allocator, "{s}: [{s}{s}]", .{ i.info.name, state.lang.custom_info_err_no_output, if (stderr.items.len > 0) state.lang.custom_info_err_no_output_error else "" }); } state.allocator.free(lbl.text); - lbl.text = try state.allocator.dupe(u8, stdout.items); + try lbl.setTextAlloc(state.allocator, "{s}", .{stdout.items}); // Called to re-position the widgets after they receive their output. try positionWidgets(state);