Cleanups: s/ENOMEM/krb5_enomem(context)/
This commit is contained in:
@@ -153,11 +153,8 @@ krb5_kt_register(krb5_context context,
|
||||
|
||||
tmp = realloc(context->kt_types,
|
||||
(context->num_kt_types + 1) * sizeof(*context->kt_types));
|
||||
if(tmp == NULL) {
|
||||
krb5_set_error_message(context, ENOMEM,
|
||||
N_("malloc: out of memory", ""));
|
||||
return ENOMEM;
|
||||
}
|
||||
if(tmp == NULL)
|
||||
return krb5_enomem(context);
|
||||
memcpy(&tmp[context->num_kt_types], ops,
|
||||
sizeof(tmp[context->num_kt_types]));
|
||||
context->kt_types = tmp;
|
||||
@@ -232,10 +229,8 @@ krb5_kt_resolve(krb5_context context,
|
||||
}
|
||||
|
||||
k = malloc (sizeof(*k));
|
||||
if (k == NULL) {
|
||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||
return ENOMEM;
|
||||
}
|
||||
if (k == NULL)
|
||||
return krb5_enomem(context);
|
||||
memcpy(k, &context->kt_types[i], sizeof(*k));
|
||||
k->data = NULL;
|
||||
ret = (*k->resolve)(context, residual, k);
|
||||
@@ -449,9 +444,8 @@ krb5_kt_get_full_name(krb5_context context,
|
||||
return ret;
|
||||
|
||||
if (asprintf(str, "%s:%s", type, name) == -1) {
|
||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||
*str = NULL;
|
||||
return ENOMEM;
|
||||
return krb5_enomem(context);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user