From 4469180f0fb7a6990499ea7e0d632c3ff877cd9f Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 5 May 2009 16:57:42 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/preauth2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.26.2