When gssint_get_mechanism() loads a GSS mech, it must clear errinfo if
krb5int_open_plugin() or krb5int_get_plugin_func() returns an error.
if (krb5int_open_plugin(aMech->uLibName, &dl, &errinfo) != 0 ||
errinfo.code != 0) {
+ k5_clear_error(&errinfo);
k5_mutex_unlock(&g_mechListLock);
return ((gss_mechanism)NULL);
}
aMech->mech = (*sym)(aMech->mech_type);
} else {
/* Try dynamic dispatch table */
+ k5_clear_error(&errinfo);
aMech->mech = build_dynamicMech(dl, aMech->mech_type);
aMech->freeMech = 1;
}