mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
seat: fix memory leak when explicitly destroying the seat
This commit is contained in:
parent
2166fbdcfb
commit
707cb2cdfc
1 changed files with 3 additions and 1 deletions
4
seat.c
4
seat.c
|
|
@ -652,6 +652,7 @@ handle_destroy(struct wl_listener *listener, void *data)
|
|||
wl_list_remove(&seat->request_set_cursor.link);
|
||||
wl_list_remove(&seat->request_set_selection.link);
|
||||
wl_list_remove(&seat->request_set_primary_selection.link);
|
||||
free(seat);
|
||||
}
|
||||
|
||||
struct cg_seat *
|
||||
|
|
@ -739,7 +740,8 @@ seat_destroy(struct cg_seat *seat)
|
|||
return;
|
||||
}
|
||||
|
||||
handle_destroy(&seat->destroy, NULL);
|
||||
// Destroying the wlr seat will trigger the destroy handler on our seat,
|
||||
// which will in turn free it.
|
||||
wlr_seat_destroy(seat->seat);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue