From 0936fc3597c69ca84019fa146ebe4c5a86839f03 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 25 May 2020 14:02:22 +0200 Subject: [PATCH] upekts: Fix error handling in verify_stop_deinit_cb The error memory management was incorrect possibly causing double free's and critical warnings. --- libfprint/drivers/upekts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfprint/drivers/upekts.c b/libfprint/drivers/upekts.c index b6dd0a8..3df9674 100644 --- a/libfprint/drivers/upekts.c +++ b/libfprint/drivers/upekts.c @@ -1237,11 +1237,11 @@ verify_stop_deinit_cb (FpiSsm *ssm, FpDevice *dev, GError *error) fp_warn ("Error deinitializing: %s", error->message); if (data->error) - fpi_device_verify_complete (dev, data->error); + fpi_device_verify_complete (dev, g_steal_pointer (&data->error)); else fpi_device_verify_complete (dev, g_steal_pointer (&error)); - g_error_free (error); + g_clear_error (&error); } static void