mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 09:21:28 +00:00
tearing: fix UAF on destroy
Fixes:9a1c411abd
(cherry picked from commit32e5e5232d
)
This commit is contained in:
parent
fa4912b1f9
commit
04943bc6ac
|
@ -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