mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
pam: Fix double free after verification error
The data->result was free'ed both in the loop (before breaking) and afterwards. As the first case did not set the pointer to NULL, this could result in a double free. Fix this by simply removing the free that is in the loop and relying on the cleanup later on.
This commit is contained in:
@ -423,12 +423,10 @@ do_verify (pam_handle_t *pamh,
|
|||||||
ret = PAM_AUTHINFO_UNAVAIL;
|
ret = PAM_AUTHINFO_UNAVAIL;
|
||||||
} else if (str_equal (data->result, "verify-disconnected")) {
|
} else if (str_equal (data->result, "verify-disconnected")) {
|
||||||
ret = PAM_AUTHINFO_UNAVAIL;
|
ret = PAM_AUTHINFO_UNAVAIL;
|
||||||
free (data->result);
|
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
send_info_msg (data->pamh, _("An unknown error occurred"));
|
send_info_msg (data->pamh, _("An unknown error occurred"));
|
||||||
ret = PAM_AUTH_ERR;
|
ret = PAM_AUTH_ERR;
|
||||||
free (data->result);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free (data->result);
|
free (data->result);
|
||||||
|
|||||||
Reference in New Issue
Block a user