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

@@ -49,11 +49,8 @@ krb5_padata_add(krb5_context context, METHOD_DATA *md,
PA_DATA *pa;
pa = realloc (md->val, (md->len + 1) * sizeof(*md->val));
if (pa == NULL) {
krb5_set_error_message(context, ENOMEM,
N_("malloc: out of memory", ""));
return ENOMEM;
}
if (pa == NULL)
return krb5_enomem(context);
md->val = pa;
pa[md->len].padata_type = type;