river-status: fix memory leak
This commit is contained in:
parent
12d34d4ded
commit
2ef8261493
1 changed files with 1 additions and 0 deletions
|
@ -53,6 +53,7 @@ fn handleResourceDestroy(wl_resource: ?*c.wl_resource) callconv(.C) void {
|
||||||
const self = util.voidCast(Self, c.wl_resource_get_user_data(wl_resource).?);
|
const self = util.voidCast(Self, c.wl_resource_get_user_data(wl_resource).?);
|
||||||
const node = @fieldParentPtr(std.SinglyLinkedList(Self).Node, "data", self);
|
const node = @fieldParentPtr(std.SinglyLinkedList(Self).Node, "data", self);
|
||||||
self.seat.status_trackers.remove(node);
|
self.seat.status_trackers.remove(node);
|
||||||
|
util.gpa.destroy(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn destroy(wl_client: ?*c.wl_client, wl_resource: ?*c.wl_resource) callconv(.C) void {
|
fn destroy(wl_client: ?*c.wl_client, wl_resource: ?*c.wl_resource) callconv(.C) void {
|
||||||
|
|
Loading…
Reference in a new issue