From: Greg Hudson Date: Tue, 5 May 2009 17:11:48 +0000 (+0000) Subject: Fix a memory leak in pa_sam X-Git-Tag: krb5-1.8-alpha1~490 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0aad6757a3f747fc26b3b40869b795d2156e14ce;p=krb5.git Fix a memory leak in pa_sam git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22317 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index 48d743a40..d00d59b9d 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -876,8 +876,11 @@ krb5_error_code pa_sam(krb5_context context, *etype = ENCTYPE_DES_CBC_CRC; if ((ret = (gak_fct)(context, request->client, *etype, prompter, - prompter_data, salt, s2kparams, as_key, gak_data))) - return(ret); + prompter_data, salt, s2kparams, as_key, + gak_data))) { + krb5_free_sam_challenge(context, sam_challenge); + return(ret); + } } snprintf(name, sizeof(name), "%.*s", SAMDATA(sam_challenge->sam_type_name, "SAM Authentication",