[mutter/wip/carlosg/unlink-token-on-free] wayland: Unlink surface listener when freeing token
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/unlink-token-on-free] wayland: Unlink surface listener when freeing token
- Date: Thu, 25 Aug 2022 09:09:35 +0000 (UTC)
commit ad9a5652d45a13eb5e4b925f6e448e4eb69a28c3
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.
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 b7035ab5ce..db1f2b10d8 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]