diff options
author | assar <assar@FreeBSD.org> | 2001-06-21 02:12:07 +0000 |
---|---|---|
committer | assar <assar@FreeBSD.org> | 2001-06-21 02:12:07 +0000 |
commit | 0c8fa354358381b3f1b92598e7f1b46f8cf744cc (patch) | |
tree | ed28ffb73cc0ae48a9892dab3f10b09bc36436d5 /crypto/heimdal/lib/krb5/mcache.c | |
parent | 06c859ecf534f468a52f24a3eb14409d73a4907c (diff) | |
download | FreeBSD-src-0c8fa354358381b3f1b92598e7f1b46f8cf744cc.zip FreeBSD-src-0c8fa354358381b3f1b92598e7f1b46f8cf744cc.tar.gz |
import of heimdal 0.3f
Diffstat (limited to 'crypto/heimdal/lib/krb5/mcache.c')
-rw-r--r-- | crypto/heimdal/lib/krb5/mcache.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crypto/heimdal/lib/krb5/mcache.c b/crypto/heimdal/lib/krb5/mcache.c index 29c5cfd..8c44b6e 100644 --- a/crypto/heimdal/lib/krb5/mcache.c +++ b/crypto/heimdal/lib/krb5/mcache.c @@ -33,7 +33,7 @@ #include "krb5_locl.h" -RCSID("$Id: mcache.c,v 1.12 2000/11/15 02:12:51 assar Exp $"); +RCSID("$Id: mcache.c,v 1.13 2001/05/14 06:14:49 assar Exp $"); typedef struct krb5_mcache { char *name; @@ -65,6 +65,7 @@ static krb5_mcache * mcc_alloc(const char *name) { krb5_mcache *m; + ALLOC(m, 1); if(m == NULL) return NULL; @@ -101,8 +102,10 @@ mcc_resolve(krb5_context context, krb5_ccache *id, const char *res) } m = mcc_alloc(res); - if (m == NULL) + if (m == NULL) { + krb5_set_error_string (context, "malloc: out of memory"); return KRB5_CC_NOMEM; + } (*id)->data.data = m; (*id)->data.length = sizeof(*m); @@ -118,8 +121,10 @@ mcc_gen_new(krb5_context context, krb5_ccache *id) m = mcc_alloc(NULL); - if (m == NULL) + if (m == NULL) { + krb5_set_error_string (context, "malloc: out of memory"); return KRB5_CC_NOMEM; + } (*id)->data.data = m; (*id)->data.length = sizeof(*m); @@ -203,8 +208,10 @@ mcc_store_cred(krb5_context context, return ENOENT; l = malloc (sizeof(*l)); - if (l == NULL) + if (l == NULL) { + krb5_set_error_string (context, "malloc: out of memory"); return KRB5_CC_NOMEM; + } l->next = m->creds; m->creds = l; memset (&l->cred, 0, sizeof(l->cred)); |