summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKevin Coffman <kwc@citi.umich.edu>2006-12-08 21:02:02 +0000
committerKevin Coffman <kwc@citi.umich.edu>2006-12-08 21:02:02 +0000
commitf0bf53b69ba1349c08ac7403238470b1aa84d2ca (patch)
tree3c68b3a2acb4af4b9f8e5b49715d18ff8c529aa6 /src/lib
parente7201498c89ab919fdae2b9d9ef86f55460ff8c0 (diff)
downloadkrb5-f0bf53b69ba1349c08ac7403238470b1aa84d2ca.tar.gz
krb5-f0bf53b69ba1349c08ac7403238470b1aa84d2ca.tar.xz
krb5-f0bf53b69ba1349c08ac7403238470b1aa84d2ca.zip
Don't leak padata when looping for krb5_do_preauth_tryagain()
* src/lib/krb5/krb/get_in_tkt.c: krb5_get_init_creds() Free any existing request.padata at the top of the loop calling krb5_do_preauth() and krb5_do_preauth_tryagain(). ticket: new component: krb5-libs Target_Version: 1.6 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18935 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 5f26e1b63..c12bd5b4b 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -1097,12 +1097,12 @@ krb5_get_init_creds(krb5_context context,
/* now, loop processing preauth data and talking to the kdc */
for (loopcount = 0; loopcount < MAX_IN_TKT_LOOPS; loopcount++) {
+ if (request.padata) {
+ krb5_free_pa_data(context, request.padata);
+ request.padata = NULL;
+ }
if (!err_reply) {
/* either our first attempt, or retrying after PREAUTH_NEEDED */
- if (request.padata) {
- krb5_free_pa_data(context, request.padata);
- request.padata = NULL;
- }
if ((ret = krb5_do_preauth(context,
&request,
encoded_request_body,