aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2024-08-07 15:27:02 +0300
committerKenny Levinsen <kl@kl.wtf>2024-08-07 14:33:03 +0200
commit32e5e5232d1b0b5a34b4296a79a4e8cfa32b5090 (patch)
treec14065a4bc5165eddadb3927a2ec7e57a3335103
parent3e956b922958b182912775497812cd42439b2955 (diff)
tearing: fix UAF on destroy
Fixes: 9a1c411abd8261c121dcd50dfe54132718768084
-rw-r--r--sway/desktop/tearing.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/desktop/tearing.c b/sway/desktop/tearing.c
index b74c74d2..d8d27645 100644
--- a/sway/desktop/tearing.c
+++ b/sway/desktop/tearing.c
@@ -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);
}