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

@@ -191,8 +191,7 @@ krb5_rd_safe(krb5_context context,
outbuf->length = safe.safe_body.user_data.length;
outbuf->data = malloc(outbuf->length);
if (outbuf->data == NULL && outbuf->length != 0) {
ret = ENOMEM;
krb5_set_error_message(context, ret, N_("malloc: out of memory", ""));
ret = krb5_enomem(context);
krb5_data_zero(outbuf);
goto failure;
}