Blame SOURCES/0044-fp-device-Unref-the-print-once-we-ve-notified-the-pr.patch

73b847
From 364dd9f3de7f027723bceaa68584cceb66b6d15d Mon Sep 17 00:00:00 2001
73b847
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
73b847
Date: Tue, 26 Nov 2019 20:43:33 +0100
73b847
Subject: [PATCH 044/181] fp-device: Unref the print once we've notified the
73b847
 progress
73b847
73b847
When we notify the enroll progress with a print, this needs to be unreffed
73b847
once we're done, but this only was happening in case of error.
73b847
73b847
Since it's not up to the callback function to free it, let's do it at the
73b847
end of the function.
73b847
73b847
As per this, clarify the docs for FpEnrollProgress marking it as transfer
73b847
none.
73b847
---
73b847
 libfprint/fp-device.c | 2 ++
73b847
 libfprint/fp-device.h | 2 +-
73b847
 2 files changed, 3 insertions(+), 1 deletion(-)
73b847
73b847
diff --git a/libfprint/fp-device.c b/libfprint/fp-device.c
73b847
index b2190bd..c9d1b89 100644
73b847
--- a/libfprint/fp-device.c
73b847
+++ b/libfprint/fp-device.c
73b847
@@ -2344,6 +2344,8 @@ fpi_device_enroll_progress (FpDevice *device,
73b847
     }
73b847
   if (error)
73b847
     g_error_free (error);
73b847
+
73b847
+  g_clear_object (&print);
73b847
 }
73b847
 
73b847
 
73b847
diff --git a/libfprint/fp-device.h b/libfprint/fp-device.h
73b847
index 821514d..4785064 100644
73b847
--- a/libfprint/fp-device.h
73b847
+++ b/libfprint/fp-device.h
73b847
@@ -113,7 +113,7 @@ GQuark fp_device_error_quark (void);
73b847
  * FpEnrollProgress:
73b847
  * @device: a #FpDevice
73b847
  * @completed_stages: Number of completed stages
73b847
- * @print: (nullable): The last scaned print
73b847
+ * @print: (nullable) (transfer none): The last scaned print
73b847
  * @user_data: (nullable): User provided data
73b847
  * @error: (nullable) (transfer none): #GError or %NULL
73b847
  *
73b847
-- 
73b847
2.24.1
73b847