mirror of
https://github.com/swaywm/sway.git
synced 2025-02-09 11:45:16 +01:00
tearing: fix UAF on destroy
Fixes:9a1c411abd
(cherry picked from commit32e5e5232d
)
This commit is contained in:
parent
fa4912b1f9
commit
04943bc6ac
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,8 @@ static void handle_tearing_controller_destroy(struct wl_listener *listener,
|
|||
void *data) {
|
||||
struct sway_tearing_controller *controller =
|
||||
wl_container_of(listener, controller, destroy);
|
||||
wl_list_remove(&controller->set_hint.link);
|
||||
wl_list_remove(&controller->destroy.link);
|
||||
wl_list_remove(&controller->link);
|
||||
free(controller);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue