upekts: Fix error handling in verify_stop_deinit_cb

The error memory management was incorrect possibly causing double free's
and critical warnings.
This commit is contained in:
Benjamin Berg 2020-05-25 14:02:22 +02:00 committed by Benjamin Berg
parent b7f436e8de
commit 0936fc3597

View file

@ -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