summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeng Xue <xnsuda@yahoo.com>2014-05-05 16:42:02 -0700
committerGreg Hudson <ghudson@mit.edu>2014-05-07 14:30:52 -0400
commit0477f69ba67e7071cb3671f94c466ba99f15285e (patch)
tree7138deff1c66b8ca40d1274bcc205d9469164efb
parent7783054742ddd807f7b2f7157d6ed81b7fb614eb (diff)
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]
-rw-r--r--src/lib/gssapi/krb5/lucid_context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/gssapi/krb5/lucid_context.c b/src/lib/gssapi/krb5/lucid_context.c
index dc129e15e..85df7fda5 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? */
}