Use krb5_enomem() more consistently in lib/krb5.

This commit is contained in:
Roland C. Dowdeswell
2013-02-13 16:15:00 +08:00
parent edae63418e
commit f0f07ff408
62 changed files with 393 additions and 837 deletions

View File

@@ -176,10 +176,8 @@ krb5_copy_data(krb5_context context,
{
krb5_error_code ret;
ALLOC(*outdata, 1);
if(*outdata == NULL) {
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
return ENOMEM;
}
if(*outdata == NULL)
return krb5_enomem(context);
ret = der_copy_octet_string(indata, *outdata);
if(ret) {
krb5_clear_error_message (context);