#include "krb5_locl.h"
-RCSID("$Id: auth_context.c 14452 2005-01-05 02:34:08Z lukeh $");
+RCSID("$Id: auth_context.c 21745 2007-07-31 16:11:25Z lha $");
krb5_error_code KRB5_LIB_FUNCTION
krb5_auth_con_init(krb5_context context,
if (auth_context->local_address)
krb5_free_address (context, auth_context->local_address);
else
- auth_context->local_address = malloc(sizeof(krb5_address));
+ if ((auth_context->local_address = malloc(sizeof(krb5_address))) == NULL)
+ return ENOMEM;
krb5_copy_address(context, local_addr, auth_context->local_address);
}
if (remote_addr) {
if (auth_context->remote_address)
krb5_free_address (context, auth_context->remote_address);
else
- auth_context->remote_address = malloc(sizeof(krb5_address));
+ if ((auth_context->remote_address = malloc(sizeof(krb5_address))) == NULL)
+ return ENOMEM;
krb5_copy_address(context, remote_addr, auth_context->remote_address);
}
return 0;