aboutsummaryrefslogtreecommitdiff
path: root/lib/krb5/build_auth.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2018-04-04 04:21:19 +0000
committerHiroki Sato <hrs@FreeBSD.org>2018-04-04 04:21:19 +0000
commitd684f11da759490a8d98d7b790796106285f4084 (patch)
tree27b7356df710fdf1440fe2c23154b8121e99f2ab /lib/krb5/build_auth.c
parentf52d4664e3f68828c06f85bfc1afa271e3e04713 (diff)
Import Heimdal 7.5.0.vendor/heimdal/7.5.0
Notes
Notes: svn path=/vendor-crypto/heimdal/dist/; revision=331978 svn path=/vendor-crypto/heimdal/7.5.0/; revision=331979; tag=vendor/heimdal/7.5.0
Diffstat (limited to 'lib/krb5/build_auth.c')
-rw-r--r--lib/krb5/build_auth.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/krb5/build_auth.c b/lib/krb5/build_auth.c
index 01145a28c604..003ccae8cc87 100644
--- a/lib/krb5/build_auth.c
+++ b/lib/krb5/build_auth.c
@@ -62,8 +62,7 @@ make_etypelist(krb5_context context,
ALLOC_SEQ(&ad, 1);
if (ad.val == NULL) {
free(buf);
- krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
- return ENOMEM;
+ return krb5_enomem(context);
}
ad.val[0].ad_type = KRB5_AUTHDATA_GSS_API_ETYPE_NEGOTIATION;
@@ -82,16 +81,14 @@ make_etypelist(krb5_context context,
ALLOC(*auth_data, 1);
if (*auth_data == NULL) {
free(buf);
- krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
- return ENOMEM;
+ return krb5_enomem(context);
}
ALLOC_SEQ(*auth_data, 1);
if ((*auth_data)->val == NULL) {
free(*auth_data);
free(buf);
- krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
- return ENOMEM;
+ return krb5_enomem(context);
}
(*auth_data)->val[0].ad_type = KRB5_AUTHDATA_IF_RELEVANT;
@@ -136,7 +133,7 @@ _krb5_build_authenticator (krb5_context context,
&auth_context->local_seqnumber);
ALLOC(auth.seq_number, 1);
if(auth.seq_number == NULL) {
- ret = ENOMEM;
+ ret = krb5_enomem(context);
goto fail;
}
*auth.seq_number = auth_context->local_seqnumber;
@@ -147,7 +144,7 @@ _krb5_build_authenticator (krb5_context context,
if (cksum) {
ALLOC(auth.cksum, 1);
if (auth.cksum == NULL) {
- ret = ENOMEM;
+ ret = krb5_enomem(context);
goto fail;
}
ret = copy_Checksum(cksum, auth.cksum);