From: Ben Kaduk Date: Wed, 12 Sep 2012 15:35:04 +0000 (-0400) Subject: Unregister error message key on library unload X-Git-Tag: krb5-1.11-alpha1~183 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ab584c830024757cc628b1783dde6220a9fec6d;p=thirdparty%2Fkrb5.git Unregister error message key on library unload Revision fcdd2de1 added the K5_KEY_GSS_KRB5_ERROR_MESSAGE key, and registered it in the gssapi library initialization routine, but did not unregister it in the libary finalization routine. When the library is unloaded and reloaded in the same process, this leads to an assertion failure, since we check that destructors_set[keynum] is zero (no destructor set) when registering a key in util/support/threads.c. Unregister the key on library cleanup to resolve the error. ticket: 7353 target_version: 1.10.4 tags: pullup --- diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index bff9f78d25..31f705d824 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -1023,6 +1023,7 @@ void gss_krb5int_lib_fini(void) k5_key_delete(K5_KEY_GSS_KRB5_SET_CCACHE_OLD_NAME); k5_key_delete(K5_KEY_GSS_KRB5_CCACHE_NAME); + k5_key_delete(K5_KEY_GSS_KRB5_ERROR_MESSAGE); k5_mutex_destroy(&kg_vdb.mutex); #ifndef _WIN32 k5_mutex_destroy(&kg_kdc_flag_mutex);