summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/build_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/krb5/build_auth.c')
-rw-r--r--crypto/heimdal/lib/krb5/build_auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/heimdal/lib/krb5/build_auth.c b/crypto/heimdal/lib/krb5/build_auth.c
index c75b2f1..b1650fd 100644
--- a/crypto/heimdal/lib/krb5/build_auth.c
+++ b/crypto/heimdal/lib/krb5/build_auth.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#include <krb5_locl.h>
-RCSID("$Id: build_auth.c,v 1.34 2000/11/15 06:58:51 assar Exp $");
+RCSID("$Id: build_auth.c,v 1.35 2001/05/14 06:14:44 assar Exp $");
krb5_error_code
krb5_build_authenticator (krb5_context context,
@@ -53,8 +53,10 @@ krb5_build_authenticator (krb5_context context,
krb5_crypto crypto;
auth = malloc(sizeof(*auth));
- if (auth == NULL)
+ if (auth == NULL) {
+ krb5_set_error_string(context, "malloc: out of memory");
return ENOMEM;
+ }
memset (auth, 0, sizeof(*auth));
auth->authenticator_vno = 5;
@@ -100,6 +102,7 @@ krb5_build_authenticator (krb5_context context,
buf_size = 1024;
buf = malloc (buf_size);
if (buf == NULL) {
+ krb5_set_error_string(context, "malloc: out of memory");
ret = ENOMEM;
goto fail;
}
@@ -116,6 +119,7 @@ krb5_build_authenticator (krb5_context context,
buf_size *= 2;
tmp = realloc (buf, buf_size);
if (tmp == NULL) {
+ krb5_set_error_string(context, "malloc: out of memory");
ret = ENOMEM;
goto fail;
}
OpenPOWER on IntegriCloud