mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-19 12:04:19 +02:00
double free. whoops.
This commit is contained in:
parent
f54bc677f1
commit
c7db89a314
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue