virtual-device: Use an autoptr to handle the new scan print

We may not use this print, so let's use an autoptr to handle its life
cycle to clean it up when not used.
This commit is contained in:
Marco Trevisan (Treviño)
2022-09-27 20:01:49 +02:00
parent 0b6a92150c
commit 669e091b03

View File

@@ -526,8 +526,8 @@ dev_verify (FpDevice *dev)
if (scan_id)
{
g_autoptr(FpPrint) new_scan = NULL;
GVariant *data = NULL;
FpPrint *new_scan;
FpPrint *print;
gboolean success;
@@ -556,7 +556,7 @@ dev_verify (FpDevice *dev)
self->match_reported = TRUE;
fpi_device_verify_report (dev,
success ? FPI_MATCH_SUCCESS : FPI_MATCH_FAIL,
new_scan,
g_steal_pointer (&new_scan),
NULL);
}
}