1
0
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:
Klas Lindfors 2015-01-21 09:57:02 +01:00
parent 0b0c8d80aa
commit b02ab9902a

View File

@ -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;
}