svn rev #23834: trunk/src/lib/gssapi/krb5/

tlyu@MIT.EDU tlyu at MIT.EDU
Tue Mar 23 18:00:13 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23834
Commit By: tlyu
Log Message:
ticket: 6678
target_version: 1.8.1
tags: pullup

Apply patch from Arlene Berry to not use freed memory in
gss_import_sec_context in some error paths.


Changed Files:
U   trunk/src/lib/gssapi/krb5/import_sec_context.c
Modified: trunk/src/lib/gssapi/krb5/import_sec_context.c
===================================================================
--- trunk/src/lib/gssapi/krb5/import_sec_context.c	2010-03-23 19:08:53 UTC (rev 23833)
+++ trunk/src/lib/gssapi/krb5/import_sec_context.c	2010-03-23 22:00:13 UTC (rev 23834)
@@ -106,12 +106,13 @@
     ibp = (krb5_octet *) interprocess_token->value;
     blen = (size_t) interprocess_token->length;
     kret = kg_ctx_internalize(context, (krb5_pointer *) &ctx, &ibp, &blen);
-    krb5_free_context(context);
     if (kret) {
         *minor_status = (OM_uint32) kret;
         save_error_info(*minor_status, context);
+        krb5_free_context(context);
         return(GSS_S_FAILURE);
     }
+    krb5_free_context(context);
 
     /* intern the context handle */
     if (! kg_save_ctx_id((gss_ctx_id_t) ctx)) {




More information about the cvs-krb5 mailing list