diff --git a/src/wayland/meta-wayland-tablet-manager.c b/src/wayland/meta-wayland-tablet-manager.c index 7ee1c9fe7..c8aae5d74 100644 --- a/src/wayland/meta-wayland-tablet-manager.c +++ b/src/wayland/meta-wayland-tablet-manager.c @@ -127,10 +127,10 @@ meta_wayland_tablet_manager_init (MetaWaylandCompositor *compositor) } void -meta_wayland_tablet_manager_free (MetaWaylandTabletManager *tablet_manager) +meta_wayland_tablet_manager_finalize (MetaWaylandCompositor *compositor) { - g_hash_table_destroy (tablet_manager->seats); - g_free (tablet_manager); + g_hash_table_destroy (compositor->tablet_manager->seats); + g_clear_pointer (&compositor->tablet_manager, g_free); } static MetaWaylandTabletSeat * diff --git a/src/wayland/meta-wayland-tablet-manager.h b/src/wayland/meta-wayland-tablet-manager.h index 83f9d3d0f..6491fbcbc 100644 --- a/src/wayland/meta-wayland-tablet-manager.h +++ b/src/wayland/meta-wayland-tablet-manager.h @@ -37,7 +37,7 @@ struct _MetaWaylandTabletManager }; void meta_wayland_tablet_manager_init (MetaWaylandCompositor *compositor); -void meta_wayland_tablet_manager_free (MetaWaylandTabletManager *tablet_manager); +void meta_wayland_tablet_manager_finalize (MetaWaylandCompositor *compositor); gboolean meta_wayland_tablet_manager_consumes_event (MetaWaylandTabletManager *manager, const ClutterEvent *event); diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index f8b23fec8..4cc2248d3 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -451,6 +451,7 @@ meta_wayland_compositor_finalize (GObject *object) meta_wayland_activation_finalize (compositor); meta_wayland_outputs_finalize (compositor); meta_wayland_presentation_time_finalize (compositor); + meta_wayland_tablet_manager_finalize (compositor); g_hash_table_destroy (compositor->scheduled_surface_associations);