summaryrefslogtreecommitdiff
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
commitf9d0b7bbfba3099e4b6e55961dac4291ada6b684 (patch)
treed0ee5f4d6c587bc19224bf441e22b3fa02bd76a5
parentdfd7b7ce181333ef9c7a8e7a5c5fefa34c07b14d (diff)
tearing: fix UAF on destroy
Fixes: 9a1c411abd8261c121dcd50dfe54132718768084 (cherry picked from commit 32e5e5232d1b0b5a34b4296a79a4e8cfa32b5090)
-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);
}