mirror of
https://github.com/swaywm/sway.git
synced 2025-02-18 07:14:34 +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) {
|
void *data) {
|
||||||
struct sway_tearing_controller *controller =
|
struct sway_tearing_controller *controller =
|
||||||
wl_container_of(listener, controller, destroy);
|
wl_container_of(listener, controller, destroy);
|
||||||
|
wl_list_remove(&controller->set_hint.link);
|
||||||
|
wl_list_remove(&controller->destroy.link);
|
||||||
wl_list_remove(&controller->link);
|
wl_list_remove(&controller->link);
|
||||||
free(controller);
|
free(controller);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue