svn rev #22314: trunk/src/lib/krb5/krb/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue May 5 12:55:59 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22314
Commit By: ghudson
Log Message:
In pa_sam_2, free scratch in a couple of error-handling blocks where
it was live and not freed.  The function should be reorganized to use
a cleanup handler, but (I believe) is not covered by the test suite
and should not undergo such major surgery until it is.



Changed Files:
U   trunk/src/lib/krb5/krb/preauth2.c
Modified: trunk/src/lib/krb5/krb/preauth2.c
===================================================================
--- trunk/src/lib/krb5/krb/preauth2.c	2009-05-05 16:46:29 UTC (rev 22313)
+++ trunk/src/lib/krb5/krb/preauth2.c	2009-05-05 16:55:58 UTC (rev 22314)
@@ -1652,6 +1652,7 @@
    if (retval) {
 	krb5_free_sam_challenge_2(context, sc2);
 	krb5_free_sam_challenge_2_body(context, sc2b);
+	krb5_free_data(context, scratch);
 	return(retval);
    }
    sr2.sam_enc_nonce_or_sad.ciphertext.length = ciph_len;
@@ -1662,6 +1663,7 @@
    if (!sr2.sam_enc_nonce_or_sad.ciphertext.data) {
 	krb5_free_sam_challenge_2(context, sc2);
 	krb5_free_sam_challenge_2_body(context, sc2b);
+	krb5_free_data(context, scratch);
 	return(ENOMEM);
    }
 




More information about the cvs-krb5 mailing list