]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Unregister error message key on library unload
authorBen Kaduk <kaduk@mit.edu>
Wed, 12 Sep 2012 15:35:04 +0000 (11:35 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 12 Sep 2012 19:36:41 +0000 (15:36 -0400)
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.

(cherry picked from commit 4ab584c830024757cc628b1783dde6220a9fec6d)

ticket: 7353
version_fixed: 1.10.4
status: resolved

src/lib/gssapi/krb5/gssapi_krb5.c

index 068af434dff807985d9a374154b2f80212fc4a9c..efe0ad3eca5622c74f9dbd89bbbbca39de184e45 100644 (file)
@@ -1026,6 +1026,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);