mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
pam: Avoid segfault on login without devices
Avoid crashing if paths_array is NULL. https://bugs.freedesktop.org/show_bug.cgi?id=49904
This commit is contained in:
committed by
Bastien Nocera
parent
4c120e487b
commit
73edad087f
@ -182,7 +182,9 @@ static DBusGProxy *open_device(pam_handle_t *pamh, DBusGConnection *connection,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (paths_array == NULL) {
|
||||
if (paths_array == NULL || paths_array->len == 0) {
|
||||
if (paths_array != NULL)
|
||||
g_ptr_array_free (paths_array, TRUE);
|
||||
D(pamh, "No devices found\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user