From: Neng Xue Date: Mon, 5 May 2014 23:42:02 +0000 (-0700) Subject: Fix unlikely memory leak exporting lucid context X-Git-Tag: krb5-1.13-alpha1~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0477f69ba67e7071cb3671f94c466ba99f15285e;p=thirdparty%2Fkrb5.git Fix unlikely memory leak exporting lucid context If the GSSAPI context has an unrecognized proto field (which should never happen), free the context we allocated before returning EINVAL. [ghudson@mit.edu: clarify commit message] --- diff --git a/src/lib/gssapi/krb5/lucid_context.c b/src/lib/gssapi/krb5/lucid_context.c index dc129e15e7..85df7fda59 100644 --- a/src/lib/gssapi/krb5/lucid_context.c +++ b/src/lib/gssapi/krb5/lucid_context.c @@ -215,6 +215,7 @@ make_external_lucid_ctx_v1( } } else { + xfree(lctx); return EINVAL; /* XXX better error code? */ }