From 9ecffe21d8b0e70e0d3d972aaeae75e39dcc6cd0 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 14 Jun 2021 22:45:11 +0000 Subject: [PATCH] layout: fix use-after-free in destroy() --- river/Layout.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/river/Layout.zig b/river/Layout.zig index 3682ec1..eca3d7b 100644 --- a/river/Layout.zig +++ b/river/Layout.zig @@ -191,8 +191,8 @@ pub fn destroy(self: *Self) void { server.root.startTransaction(); } + self.layout.setHandler(?*c_void, handleRequestInert, null, null); + util.gpa.free(self.namespace); util.gpa.destroy(node); - - self.layout.setHandler(?*c_void, handleRequestInert, null, null); }