(krb5_ret_principal): Fix a bug in the malloc failure part, noticed by

Arnaud Lacombe in NetBSD coverity scan.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19394 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-12-17 22:49:37 +00:00
parent 846ad516e0
commit 782482710f

View File

@@ -577,6 +577,7 @@ krb5_ret_principal(krb5_storage *sp,
p->name.name_string.val = calloc(ncomp, sizeof(*p->name.name_string.val));
if(p->name.name_string.val == NULL && ncomp != 0){
free(p->realm);
free(p);
return ENOMEM;
}
for(i = 0; i < ncomp; i++){