layout: fix use-after-free in destroy()

This commit is contained in:
Isaac Freund 2021-06-14 22:45:11 +00:00
parent 6f61ea07db
commit 9ecffe21d8
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -191,8 +191,8 @@ pub fn destroy(self: *Self) void {
server.root.startTransaction(); server.root.startTransaction();
} }
self.layout.setHandler(?*c_void, handleRequestInert, null, null);
util.gpa.free(self.namespace); util.gpa.free(self.namespace);
util.gpa.destroy(node); util.gpa.destroy(node);
self.layout.setHandler(?*c_void, handleRequestInert, null, null);
} }