summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland.c
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2022-07-23 16:42:56 +0200
committerMarge Bot <marge-bot@gnome.org>2022-07-25 14:55:59 +0000
commit4ddefb9a69223bdf962906f035edfe3c962bbc32 (patch)
tree8c15af39c44dfc6d9f6ae2e4177a102132af27b0 /src/wayland/meta-wayland.c
parent39fd32c362dcc0e277f5794d0534aee224343ebd (diff)
downloadmutter-4ddefb9a69223bdf962906f035edfe3c962bbc32.tar.gz
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>
Diffstat (limited to 'src/wayland/meta-wayland.c')
-rw-r--r--src/wayland/meta-wayland.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index dd4628c44..fff07b778 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);