--- cyrus-sasl/plugins/gssapi.c
+++ cyrus-sasl/plugins/gssapi.c
@@ -782,6 +782,11 @@ gssapi_server_mech_step(void *conn_conte
}
if (maj_stat == GSS_S_COMPLETE) {
+ /* Release server creds which are no longer needed */
+ if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
+ maj_stat = gss_release_cred(&min_stat, &text->server_creds);
+ text->server_creds = GSS_C_NO_CREDENTIAL;
+ }
/* Switch to ssf negotiation */
text->state = SASL_GSSAPI_STATE_SSFCAP;
}