[mutter] wayland: Clean up scheduled_surface_associations hash table
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Clean up scheduled_surface_associations hash table
- Date: Mon, 25 Jul 2022 15:13:57 +0000 (UTC)
commit 4ddefb9a69223bdf962906f035edfe3c962bbc32
Author: Michel Dänzer <mdaenzer redhat com>
Date: Sat Jul 23 16:42:56 2022 +0200
wayland: Clean up scheduled_surface_associations hash table
Fixes memory leak:
==995170== 192 (96 direct, 96 indirect) bytes in 1 blocks are definitely lost in loss record 14,260 of
15,641
==995170== at 0x483F7B5: malloc (vg_replace_malloc.c:381)
==995170== by 0x4B21178: g_malloc (gmem.c:125)
==995170== by 0x4B395C0: g_slice_alloc (gslice.c:1072)
==995170== by 0x4B0766D: g_hash_table_new_full (ghash.c:1071)
==995170== by 0x4A3F3A4: meta_wayland_compositor_init (meta-wayland.c:477)
==995170== by 0x4E1F509: g_type_create_instance (gtype.c:1929)
==995170== by 0x4E03DFC: g_object_new_internal (gobject.c:2011)
==995170== by 0x4E0538C: g_object_new_with_properties (gobject.c:2181)
==995170== by 0x4E05D40: g_object_new (gobject.c:1821)
==995170== by 0x4A3F8C4: meta_wayland_compositor_new (meta-wayland.c:590)
==995170== by 0x49C7FA7: meta_context_start (meta-context.c:412)
==995170== by 0x10F065: main (mutter.c:148)
Fixes: 8df2a1452cf4 ("wayland: Notify actively of xwayland window/surface associations")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2527>
src/wayland/meta-wayland.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index dd4628c441..fff07b7784 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -448,6 +448,8 @@ meta_wayland_compositor_finalize (GObject *object)
MetaBackend *backend = meta_context_get_backend (compositor->context);
ClutterActor *stage = meta_backend_get_stage (backend);
+ g_hash_table_destroy (compositor->scheduled_surface_associations);
+
g_signal_handlers_disconnect_by_func (stage, on_after_update, compositor);
g_signal_handlers_disconnect_by_func (stage, on_presented, compositor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]