Commit ba7a45d3 authored by Marco Trevisan's avatar Marco Trevisan
Browse files

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.
parent 49dced55
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment