mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
device: Always free error in delete enrolled fingers2
During delete enrolled fingers2 call, if the check-claimed control fails, we would return the error without freeing it. While this could be fixed by just a further g_error_free call, let's just remove the other manual free call, and use an auto-pointer instead for this function.
This commit is contained in:
@ -1407,7 +1407,7 @@ static void fprint_device_delete_enrolled_fingers2(FprintDevice *rdev,
|
||||
DBusGMethodInvocation *context)
|
||||
{
|
||||
FprintDevicePrivate *priv = fprint_device_get_instance_private(rdev);
|
||||
GError *error = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
if (_fprint_device_check_claimed(rdev, context, &error) == FALSE) {
|
||||
dbus_g_method_return_error (context, error);
|
||||
@ -1416,7 +1416,6 @@ static void fprint_device_delete_enrolled_fingers2(FprintDevice *rdev,
|
||||
|
||||
if (_fprint_device_check_polkit_for_action (rdev, context, "net.reactivated.fprint.device.enroll", &error) == FALSE) {
|
||||
dbus_g_method_return_error (context, error);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user