krb5: allow NULL authenticator in krb5_auth_con_free()
When freeing an auth context, allow the authenticator to be NULL. Useful for freeing partially allocated authentication context.
This commit is contained in:
@@ -86,6 +86,7 @@ krb5_auth_con_free(krb5_context context,
|
|||||||
krb5_auth_context auth_context)
|
krb5_auth_context auth_context)
|
||||||
{
|
{
|
||||||
if (auth_context != NULL) {
|
if (auth_context != NULL) {
|
||||||
|
if (auth_context->authenticator)
|
||||||
krb5_free_authenticator(context, &auth_context->authenticator);
|
krb5_free_authenticator(context, &auth_context->authenticator);
|
||||||
if(auth_context->local_address){
|
if(auth_context->local_address){
|
||||||
free_HostAddress(auth_context->local_address);
|
free_HostAddress(auth_context->local_address);
|
||||||
|
Reference in New Issue
Block a user