utils: Fix memory leak when error is ignored in list

If we get a `NoEnrolledPrints` error while list, we don't consider it an
hard error and in such case we proceed to releasing the device, but without
clearing the previously set error first.
This commit is contained in:
Marco Trevisan (Treviño) 2020-02-04 20:01:15 +01:00
parent 681bd1ed2a
commit 554df2a8d9

View file

@ -55,6 +55,7 @@ static void list_fingerprints(DBusGProxy *dev, const char *username)
g_print("ListEnrolledFingers failed: %s\n", error->message);
exit (1);
} else {
g_clear_error (&error);
fingers = NULL;
}
}