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/copy_host_realm.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/copy_host_realm.c')
-rw-r--r-- | crypto/heimdal/lib/krb5/copy_host_realm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/heimdal/lib/krb5/copy_host_realm.c b/crypto/heimdal/lib/krb5/copy_host_realm.c index 4a8f3ec..38fdfa8 100644 --- a/crypto/heimdal/lib/krb5/copy_host_realm.c +++ b/crypto/heimdal/lib/krb5/copy_host_realm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1999 - 2001 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -33,7 +33,7 @@ #include "krb5_locl.h" -RCSID("$Id: copy_host_realm.c,v 1.3 1999/12/02 17:05:08 joda Exp $"); +RCSID("$Id: copy_host_realm.c,v 1.4 2001/05/14 06:14:45 assar Exp $"); /* * Copy the list of realms from `from' to `to'. @@ -51,14 +51,17 @@ krb5_copy_host_realm(krb5_context context, ++n; ++n; *to = malloc (n * sizeof(**to)); - if (*to == NULL) + if (*to == NULL) { + krb5_set_error_string (context, "malloc: out of memory"); return ENOMEM; + } for (i = 0; i < n; ++i) (*to)[i] = NULL; for (i = 0, p = from; *p != NULL; ++p, ++i) { (*to)[i] = strdup(*p); if ((*to)[i] == NULL) { krb5_free_host_realm (context, *to); + krb5_set_error_string (context, "malloc: out of memory"); return ENOMEM; } } |