From: Greg Hudson Date: Wed, 6 May 2009 15:56:21 +0000 (+0000) Subject: Fix a memory leak in pa_sam_2 where an outer data structure wasn't X-Git-Tag: krb5-1.8-alpha1~489 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=51749e5e6d3256f071634f150d0393adce8d5629;p=krb5.git Fix a memory leak in pa_sam_2 where an outer data structure wasn't freed after the contents are coopted. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22318 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index d00d59b9d..693791f85 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -1705,6 +1705,7 @@ krb5_error_code pa_sam_2(krb5_context context, sam_padata->pa_type = KRB5_PADATA_SAM_RESPONSE_2; sam_padata->length = scratch->length; sam_padata->contents = (krb5_octet *) scratch->data; + free(scratch); *out_padata = sam_padata;