From: Greg Hudson Date: Tue, 5 May 2009 16:57:42 +0000 (+0000) Subject: In pa_sam_2, free sc2 in an error-handling case where it was leaked X-Git-Tag: krb5-1.8-alpha1~492 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4469180f0fb7a6990499ea7e0d632c3ff877cd9f;p=krb5.git In pa_sam_2, free sc2 in an error-handling case where it was leaked git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22315 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index 442f6a767..48d743a40 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -1417,8 +1417,10 @@ krb5_error_code pa_sam_2(krb5_context context, retval = decode_krb5_sam_challenge_2_body(&sc2->sam_challenge_2_body, &sc2b); - if (retval) + if (retval) { + krb5_free_sam_challenge_2(context, sc2); return(retval); + } if (!sc2->sam_cksum || ! *sc2->sam_cksum) { krb5_free_sam_challenge_2(context, sc2);