From f49e0727a2d42b5958384008a5fe2088e5957833 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 5 May 2009 16:55:58 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/preauth2.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.26.2