[mutter/cherry-pick-9d558e33] wayland: Unlink surface listener when freeing token
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/cherry-pick-9d558e33] wayland: Unlink surface listener when freeing token
- Date: Fri, 30 Sep 2022 20:24:45 +0000 (UTC)
commit 694e3d41f5ed4f79104b427245905bdd73db78d7
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 25 11:07:53 2022 +0200
wayland: Unlink surface listener when freeing token
If the token ended up consumed and freed, we might leave a dangling
destroy listener after freeing the token struct.
Fixes: ed516dde89 (wayland: Add destruction listener to activation token surface)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2594>
(cherry picked from commit 9d558e334cb74a09932e7ea8013c7e1babb1b215)
src/wayland/meta-wayland-activation.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/wayland/meta-wayland-activation.c b/src/wayland/meta-wayland-activation.c
index 6436c4416e..500c0c73a5 100644
--- a/src/wayland/meta-wayland-activation.c
+++ b/src/wayland/meta-wayland-activation.c
@@ -214,6 +214,9 @@ meta_xdg_activation_token_free (MetaXdgActivationToken *token)
g_clear_object (&token->sequence);
}
+ if (token->surface)
+ wl_list_remove (&token->surface_listener.link);
+
g_free (token->app_id);
g_free (token->token);
g_free (token);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]