input-capture/session: Disconnect on_keymap_changed on session finalize
When Input Capture was enabled on Input Leap server startup and then finalized when Input Leap server was stopped, switching keymap was still triggering its on_keymap_changed callback, but on a freed session thus triggering use after free a segfault. Fixes: 2fb3bdf77 - input-capture: Hook up capturing of events to active session Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3360 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4257>
This commit is contained in:
parent
2da7805f58
commit
99dbcf1b8c
@ -1188,6 +1188,10 @@ static void
|
||||
meta_input_capture_session_finalize (GObject *object)
|
||||
{
|
||||
MetaInputCaptureSession *session = META_INPUT_CAPTURE_SESSION (object);
|
||||
MetaBackend *backend =
|
||||
meta_dbus_session_manager_get_backend (session->session_manager);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (backend, on_keymap_changed, session);
|
||||
|
||||
g_clear_pointer (&session->barriers, g_hash_table_unref);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user