summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-05-05 16:55:58 +0000
committerGreg Hudson <ghudson@mit.edu>2009-05-05 16:55:58 +0000
commitf49e0727a2d42b5958384008a5fe2088e5957833 (patch)
treea52ebf80726639cf53b38ab8229daf32f537e783 /src/lib
parent11aa9465a6ed940a382ee436047060624c824cb1 (diff)
downloadkrb5-f49e0727a2d42b5958384008a5fe2088e5957833.tar.gz
krb5-f49e0727a2d42b5958384008a5fe2088e5957833.tar.xz
krb5-f49e0727a2d42b5958384008a5fe2088e5957833.zip
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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22314 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/preauth2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index 542c2fa5d..442f6a767 100644
--- a/src/lib/krb5/krb/preauth2.c
+++ b/src/lib/krb5/krb/preauth2.c
@@ -1652,6 +1652,7 @@ krb5_error_code pa_sam_2(krb5_context context,
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 @@ krb5_error_code pa_sam_2(krb5_context context,
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);
}