aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-08-07 15:27:02 +0300
committerFurkan Sahin <furkan-dev@proton.me>2024-08-07 15:27:02 +0300
commit2b5bfd10855278733e6c41b1d666cb4197511b9f (patch)
treec14065a4bc5165eddadb3927a2ec7e57a3335103
parent786e26cf73ea326518e3a7ea190066576c1c913b (diff)
tearing: fix UAF on destroy
Fixes: 37d3937789deb322d2d4de7a13ace3202520026a
-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);
}