aboutsummaryrefslogtreecommitdiffstats
path: root/lib/krb5/asn1_glue.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/asn1_glue.c
parentf52d4664e3f68828c06f85bfc1afa271e3e04713 (diff)
downloadsrc-d684f11da759490a8d98d7b790796106285f4084.tar.gz
src-d684f11da759490a8d98d7b790796106285f4084.zip
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/asn1_glue.c')
-rw-r--r--lib/krb5/asn1_glue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/krb5/asn1_glue.c b/lib/krb5/asn1_glue.c
index a821faff93e8..6df8defbce9a 100644
--- a/lib/krb5/asn1_glue.c
+++ b/lib/krb5/asn1_glue.c
@@ -53,9 +53,9 @@ _krb5_principalname2krb5_principal (krb5_context context,
krb5_error_code ret;
krb5_principal p;
- p = malloc(sizeof(*p));
+ p = calloc(1, sizeof(*p));
if (p == NULL)
- return ENOMEM;
+ return krb5_enomem(context);
ret = copy_PrincipalName(&from, &p->name);
if (ret) {
free(p);
@@ -65,7 +65,7 @@ _krb5_principalname2krb5_principal (krb5_context context,
if (p->realm == NULL) {
free_PrincipalName(&p->name);
free(p);
- return ENOMEM;
+ return krb5_enomem(context);
}
*principal = p;
return 0;