fix(tabs): defer free_config in open_tabs_style_config

This commit is contained in:
CJ van den Berg 2025-01-30 14:11:33 +01:00
parent 594ea40c4e
commit f9c83ce02a
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -401,7 +401,7 @@ const cmds = struct {
const tab_style, const tab_style_bufs = root.read_config(Style, self.allocator);
break :blk .{ tab_style, tab_style_bufs };
} else .{ Style{}, &.{} };
root.free_config(self.allocator, tab_style_bufs);
defer root.free_config(self.allocator, tab_style_bufs);
var conf = std.ArrayList(u8).init(self.allocator);
defer conf.deinit();
root.write_config_to_writer(Style, tab_style, conf.writer()) catch {};