From 0477f69ba67e7071cb3671f94c466ba99f15285e Mon Sep 17 00:00:00 2001 From: Neng Xue Date: Mon, 5 May 2014 16:42:02 -0700 Subject: [PATCH] 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] --- src/lib/gssapi/krb5/lucid_context.c | 1 + 1 file changed, 1 insertion(+) 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? */ } -- 2.47.2