(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:
@@ -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++){
|
||||
|
Reference in New Issue
Block a user