From: John Kohl Date: Thu, 18 Oct 1990 16:00:54 +0000 (+0000) Subject: clean up stuff in credentials, if necessary after a lookup X-Git-Tag: krb5-1.0-alpha2~139 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d1b05886705a93a2d636e02ecc64b96adda1ed87;p=krb5.git clean up stuff in credentials, if necessary after a lookup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1272 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/gc_frm_kdc.c b/src/lib/krb5/krb/gc_frm_kdc.c index 69a55164b..0c2c31147 100644 --- a/src/lib/krb5/krb/gc_frm_kdc.c +++ b/src/lib/krb5/krb/gc_frm_kdc.c @@ -84,6 +84,7 @@ krb5_get_cred_from_kdc (ccache, cred, tgts) * XXX we're sharing some substructure here, which is * probably not safe... */ + bzero((char *)&tgtq, sizeof(tgtq)); tgtq.client = cred->client; if (retval = krb5_tgtname(krb5_princ_realm(cred->client), @@ -153,6 +154,7 @@ krb5_get_cred_from_kdc (ccache, cred, tgts) goto out; } /* now get the TGTs */ + bzero((char *)&tgtq, sizeof(tgtq)); tgtq.times = tgt.times; tgtq.client = tgt.client; tgtq.server = *next_server; @@ -173,8 +175,10 @@ krb5_get_cred_from_kdc (ccache, cred, tgts) krb5_free_realm_tree(tgs_list); goto out; } - /* XXX need to clean up stuff pointed to by tgtq? */ - tgt = tgtq; + tgt = ret_tgts[nservers]; + tgtq.client = 0; + tgtq.server = 0; + krb5_free_cred_contents(&tgtq); } krb5_free_realm_tree(tgs_list); }