device: Use g_clear_error instead of doing the same manually

We've now an utility function that can help us to free and unset an error
double pointer, so let's use it.
This commit is contained in:
Marco Trevisan (Treviño)
2020-02-04 20:03:03 +01:00
parent 1ecae1d014
commit 7dac81dcad

View File

@ -476,8 +476,7 @@ _fprint_device_check_polkit_for_actions (FprintDevice *rdev,
if (_fprint_device_check_polkit_for_action (rdev, context, action1, error) != FALSE)
return TRUE;
g_error_free (*error);
*error = NULL;
g_clear_error (error);
return _fprint_device_check_polkit_for_action (rdev, context, action2, error);
}