The mechglue leaks the mechanism context when there's an error. --- src/lib/gssapi/mechglue/g_accept_sec_context.c (revision 24487) +++ src/lib/gssapi/mechglue/g_accept_sec_context.c (working copy) @@ -353,6 +353,12 @@ free(union_ctx_id->mech_type); *context_handle = GSS_C_NO_CONTEXT; } + if (union_ctx_id->internal_ctx_id) { + mech->gss_delete_sec_context( + &temp_minor_status, + &union_ctx_id->internal_ctx_id, + GSS_C_NO_BUFFER); + } free(union_ctx_id); }