svn rev #24645: trunk/src/lib/gssapi/mechglue/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Feb 22 15:30:24 EST 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=24645
Commit By: ghudson
Log Message:
ticket: 6813

Don't leak the mechanism internal context when we get an error in the
mechglue's gss_accept_sec_context.

>From aberry at likewise.com.



Changed Files:
U   trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c
Modified: trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c
===================================================================
--- trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c	2011-02-22 17:08:54 UTC (rev 24644)
+++ trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c	2011-02-22 20:30:24 UTC (rev 24645)
@@ -352,9 +352,14 @@
 	    if (union_ctx_id->mech_type->elements)
 		free(union_ctx_id->mech_type->elements);
 	    free(union_ctx_id->mech_type);
-	    *context_handle = GSS_C_NO_CONTEXT;
 	}
+	if (union_ctx_id->internal_ctx_id && mech->gss_delete_sec_context) {
+	    mech->gss_delete_sec_context(&temp_minor_status,
+					 &union_ctx_id->internal_ctx_id,
+					 GSS_C_NO_BUFFER);
+	}
 	free(union_ctx_id);
+	*context_handle = GSS_C_NO_CONTEXT;
     }
 
     if (src_name)




More information about the cvs-krb5 mailing list