svn rev #23835: branches/krb5-1-8/src/lib/gssapi/krb5/

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


http://src.mit.edu/fisheye/changelog/krb5/?cs=23835
Commit By: tlyu
Log Message:
ticket: 6678
version_fixed: 1.8.1
status: resolved

pull up r23834 from trunk

 ------------------------------------------------------------------------
 r23834 | tlyu | 2010-03-23 15:00:13 -0700 (Tue, 23 Mar 2010) | 7 lines

 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   branches/krb5-1-8/src/lib/gssapi/krb5/import_sec_context.c
Modified: branches/krb5-1-8/src/lib/gssapi/krb5/import_sec_context.c
===================================================================
--- branches/krb5-1-8/src/lib/gssapi/krb5/import_sec_context.c	2010-03-23 22:00:13 UTC (rev 23834)
+++ branches/krb5-1-8/src/lib/gssapi/krb5/import_sec_context.c	2010-03-23 22:31:00 UTC (rev 23835)
@@ -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