Use krb5_enomem() more consistently in lib/krb5.
This commit is contained in:
@@ -138,13 +138,9 @@ krb5_copy_creds (krb5_context context,
|
||||
{
|
||||
krb5_creds *c;
|
||||
|
||||
c = malloc (sizeof (*c));
|
||||
if (c == NULL) {
|
||||
krb5_set_error_message (context, ENOMEM,
|
||||
N_("malloc: out of memory", ""));
|
||||
return ENOMEM;
|
||||
}
|
||||
memset (c, 0, sizeof(*c));
|
||||
c = calloc(1, sizeof(*c));
|
||||
if (c == NULL)
|
||||
return krb5_enomem(context);
|
||||
*outcred = c;
|
||||
return krb5_copy_creds_contents (context, incred, c);
|
||||
}
|
||||
|
Reference in New Issue
Block a user