mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
device: Re-fetch session data after synchronous operation
As the mainloop is iterated, the session-data may be modified while the client vanished handler is running. Re-fetch the session data to avoid seeing an old state and closing the device a second time. See: https://gitlab.freedesktop.org/libfprint/fprintd/-/issues/87#note_706357
This commit is contained in:
@ -672,6 +672,8 @@ _fprint_device_client_vanished (GDBusConnection *connection,
|
|||||||
|
|
||||||
/* The session may have disappeared at this point if the device
|
/* The session may have disappeared at this point if the device
|
||||||
* was already closing. */
|
* was already closing. */
|
||||||
|
g_clear_pointer (&session, session_data_unref);
|
||||||
|
session = session_data_get (priv);
|
||||||
if (session && !fp_device_close_sync (priv->dev, NULL, &error))
|
if (session && !fp_device_close_sync (priv->dev, NULL, &error))
|
||||||
g_critical ("Error closing device after disconnect: %s", error->message);
|
g_critical ("Error closing device after disconnect: %s", error->message);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user