From: John Kohl Date: Wed, 20 Feb 1991 18:15:11 +0000 (+0000) Subject: use free function X-Git-Tag: krb5-1.0-alpha4~227 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=45777f9eff4bc0b500c2e6a2b6a67e927a32089c;p=krb5.git use free function git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1745 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/file/fcc_nseq.c b/src/lib/krb5/ccache/file/fcc_nseq.c index d743961c8..4ccac0602 100644 --- a/src/lib/krb5/ccache/file/fcc_nseq.c +++ b/src/lib/krb5/ccache/file/fcc_nseq.c @@ -3,6 +3,7 @@ * $Author$ * * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -91,21 +92,7 @@ krb5_fcc_next_cred(id, cursor, creds) lose: MAYBE_CLOSE(id, kret); /* won't overwrite kret if already set */ - if (kret != KRB5_OK) { - if (creds->client) - krb5_free_principal(creds->client); - if (creds->server) - krb5_free_principal(creds->server); - if (creds->keyblock.contents) - xfree(creds->keyblock.contents); - if (creds->ticket.data) - xfree(creds->ticket.data); - if (creds->second_ticket.data) - xfree(creds->second_ticket.data); - if (creds->addresses) - krb5_free_address(creds->addresses); - if (creds->authdata) - krb5_free_authdata(creds->authdata); - } + if (kret != KRB5_OK) + krb5_free_cred_contents(creds); return kret; }