mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-20 12:54:16 +01:00
free more unfreed memory in the pam_response structure
This commit is contained in:
parent
0b0c8d80aa
commit
b02ab9902a
13
pam_yubico.c
13
pam_yubico.c
@ -384,7 +384,12 @@ display_error(pam_handle_t *pamh, const char *message) {
|
||||
}
|
||||
|
||||
D(("conv returned: '%s'", resp->resp));
|
||||
free(resp);
|
||||
if (resp)
|
||||
{
|
||||
if (resp->resp)
|
||||
free (resp->resp);
|
||||
free (resp);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
#endif /* HAVE_CR */
|
||||
@ -1017,7 +1022,11 @@ done:
|
||||
pam_set_data (pamh, "yubico_setcred_return", (void*) (intptr_t) retval, NULL);
|
||||
|
||||
if (resp)
|
||||
free (resp);
|
||||
{
|
||||
if (resp->resp)
|
||||
free (resp->resp);
|
||||
free (resp);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user