Initialize several variables - so that on error cleanup - we do not try to free
authorEzra Peisach <epeisach@mit.edu>
Mon, 14 Sep 2009 02:03:28 +0000 (02:03 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 14 Sep 2009 02:03:28 +0000 (02:03 +0000)
bogus memory.

The ticket is still open as the kproplog test is failing - but no coredump.

ticket: 6564
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22750 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_tgs_req.c

index 37a69e10d9c7d98bb94d41c054c6e06772ff1e09..2f357574d49076acd2cc7ef2cfa3b57e73d81455 100644 (file)
@@ -130,6 +130,9 @@ process_tgs_req(krb5_data *pkt, const krb5_fulladdr *from,
     krb5_pa_data *pa_tgs_req; /*points into request*/
     krb5_data scratch;
 
+    reply.padata = 0; /* For cleanup handler */
+    reply_encpart.enc_padata = 0;
+
     session_key.contents = NULL;
 
     retval = decode_krb5_tgs_req(pkt, &request);
@@ -866,7 +869,6 @@ tgt_again:
     ticket_reply.enc_part.kvno = ticket_kvno;
     /* Start assembling the response */
     reply.msg_type = KRB5_TGS_REP;
-    reply.padata = 0;/* always */
     if (isflagset(c_flags, KRB5_KDB_FLAG_PROTOCOL_TRANSITION) &&
         find_pa_data(request->padata, KRB5_PADATA_S4U_X509_USER) != NULL) {
         errcode = kdc_make_s4u2self_rep(kdc_context,