aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--river/Output.zig3
-rw-r--r--river/main.zig1
2 files changed, 4 insertions, 0 deletions
diff --git a/river/Output.zig b/river/Output.zig
index c7b576e..fdefb0f 100644
--- a/river/Output.zig
+++ b/river/Output.zig
@@ -610,6 +610,9 @@ fn handleDestroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// Clean up the wlr_output
self.wlr_output.data = null;
+ // Free the layout command
+ util.gpa.free(self.layout);
+
// Remove the destroyed output from the list
const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self);
root.outputs.remove(node);
diff --git a/river/main.zig b/river/main.zig
index e01b95a..94eff88 100644
--- a/river/main.zig
+++ b/river/main.zig
@@ -93,6 +93,7 @@ pub fn main() anyerror!void {
} else null;
defer if (startup_process) |child| {
_ = child.kill() catch |e| log.err(.server, "failed to terminate startup process: {}", .{e});
+ child.deinit();
};
log.info(.server, "running...", .{});