]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix unlikely memory leak exporting lucid context
authorNeng Xue <xnsuda@yahoo.com>
Mon, 5 May 2014 23:42:02 +0000 (16:42 -0700)
committerGreg Hudson <ghudson@mit.edu>
Wed, 7 May 2014 18:30:52 +0000 (14:30 -0400)
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

index dc129e15e7cd6d2c8ae687de19c2bbe2be7c8103..85df7fda594bb889f0c0a5a6daeea4f9e9dff101 100644 (file)
@@ -215,6 +215,7 @@ make_external_lucid_ctx_v1(
         }
     }
     else {
+        xfree(lctx);
         return EINVAL;  /* XXX better error code? */
     }