Merge pull request #2028 from ghostty-org/leak

core: surface needs to free link regex on config reload
This commit is contained in:
Mitchell Hashimoto
2024-08-01 10:00:25 -07:00
committed by GitHub

View File

@ -221,7 +221,7 @@ const DerivedConfig = struct {
window_padding_y: u32, window_padding_y: u32,
window_padding_balance: bool, window_padding_balance: bool,
title: ?[:0]const u8, title: ?[:0]const u8,
links: []const Link, links: []Link,
const Link = struct { const Link = struct {
regex: oni.Regex, regex: oni.Regex,
@ -288,6 +288,7 @@ const DerivedConfig = struct {
} }
pub fn deinit(self: *DerivedConfig) void { pub fn deinit(self: *DerivedConfig) void {
for (self.links) |*link| link.regex.deinit();
self.arena.deinit(); self.arena.deinit();
} }
}; };