mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
wayland: Clean up tablet manager state
Fixes memory leak:
==995170== 936 (40 direct, 896 indirect) bytes in 1 blocks are definitely lost in loss record 15,090 of 15,641
==995170== at 0x48445EF: calloc (vg_replace_malloc.c:1328)
==995170== by 0x4B211D0: g_malloc0 (gmem.c:155)
==995170== by 0x4A56693: meta_wayland_tablet_manager_new (meta-wayland-tablet-manager.c:109)
==995170== by 0x4A56693: meta_wayland_tablet_manager_init (meta-wayland-tablet-manager.c:126)
==995170== by 0x4A3FA95: meta_wayland_compositor_new (meta-wayland.c:626)
==995170== by 0x49C7FA7: meta_context_start (meta-context.c:412)
==995170== by 0x10F065: main (mutter.c:148)
Fixes: 745cb67988
("wayland: Initialize the MetaWaylandTabletManager")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2527>
This commit is contained in:
parent
f3cd2b8ce7
commit
d928b6baa6
@ -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 *
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user