core: surface needs to free link regex on config reload

This commit is contained in:
Mitchell Hashimoto
2024-08-01 09:41:48 -07:00
parent 6be53cc63a
commit 918a32dcf7

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();
} }
}; };