mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
fp-device: Unref the print once we've notified the progress
When we notify the enroll progress with a print, this needs to be unreffed once we're done, but this only was happening in case of error. Since it's not up to the callback function to free it, let's do it at the end of the function. As per this, clarify the docs for FpEnrollProgress marking it as transfer none.
This commit is contained in:
@@ -2344,6 +2344,8 @@ fpi_device_enroll_progress (FpDevice *device,
|
||||
}
|
||||
if (error)
|
||||
g_error_free (error);
|
||||
|
||||
g_clear_object (&print);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ GQuark fp_device_error_quark (void);
|
||||
* FpEnrollProgress:
|
||||
* @device: a #FpDevice
|
||||
* @completed_stages: Number of completed stages
|
||||
* @print: (nullable): The last scaned print
|
||||
* @print: (nullable) (transfer none): The last scaned print
|
||||
* @user_data: (nullable): User provided data
|
||||
* @error: (nullable) (transfer none): #GError or %NULL
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user