From: Ken Raeburn Date: Thu, 8 Jun 2006 19:21:53 +0000 (+0000) Subject: Avoid memory leak in error path. Reported by Rainer Weikusat X-Git-Tag: krb5-1.5-beta1~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=598b7828925bcf95d93cb36d49ac95a8488be7c2;p=krb5.git Avoid memory leak in error path. Reported by Rainer Weikusat ticket: 3791 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18088 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/set_allowable_enctypes.c b/src/lib/gssapi/krb5/set_allowable_enctypes.c index 88cae714a..2bc2090fa 100644 --- a/src/lib/gssapi/krb5/set_allowable_enctypes.c +++ b/src/lib/gssapi/krb5/set_allowable_enctypes.c @@ -115,8 +115,10 @@ gss_krb5_set_allowable_enctypes(OM_uint32 *minor_status, goto error_out; } kerr = k5_mutex_lock(&cred->lock); - if (kerr) + if (kerr) { + free(new_ktypes); goto error_out; + } if (cred->req_enctypes) free(cred->req_enctypes); cred->req_enctypes = new_ktypes;