mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
device: Throw a critical warning if the device was not cleaned up
On finalization, the device should always be cleaned up properly (no data associated with an action may be left). Show a critical warning if this is not the case, as it indicates a programming error.
This commit is contained in:
@ -218,7 +218,14 @@ static void fprint_device_finalize(GObject *object)
|
|||||||
session_data_set_new(priv, NULL, NULL);
|
session_data_set_new(priv, NULL, NULL);
|
||||||
g_clear_object (&priv->auth);
|
g_clear_object (&priv->auth);
|
||||||
g_clear_object (&priv->dev);
|
g_clear_object (&priv->dev);
|
||||||
/* FIXME close and stuff */
|
|
||||||
|
if (priv->current_action != ACTION_NONE ||
|
||||||
|
priv->_session ||
|
||||||
|
priv->verify_data ||
|
||||||
|
priv->identify_data ||
|
||||||
|
priv->current_cancellable ||
|
||||||
|
priv->current_cancel_invocation)
|
||||||
|
g_critical("Device was not cleaned up properly before being finalized.");
|
||||||
|
|
||||||
G_OBJECT_CLASS(fprint_device_parent_class)->finalize(object);
|
G_OBJECT_CLASS(fprint_device_parent_class)->finalize(object);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user