krb5 commit: Fix unlikely memory leak exporting lucid context

Greg Hudson ghudson at MIT.EDU
Wed May 7 14:38:45 EDT 2014


https://github.com/krb5/krb5/commit/0477f69ba67e7071cb3671f94c466ba99f15285e
commit 0477f69ba67e7071cb3671f94c466ba99f15285e
Author: Neng Xue <xnsuda at yahoo.com>
Date:   Mon May 5 16:42:02 2014 -0700

    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 at mit.edu: clarify commit message]

 src/lib/gssapi/krb5/lucid_context.c |    1 +
 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 dc129e1..85df7fd 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? */
     }
 


More information about the cvs-krb5 mailing list