+2005-02-08 Ken Raeburn <raeburn@mit.edu>
+
+ * threads.c (k5_key_delete) [pthread case]: Reset flags and
+ destructor function pointer to unset state.
+ (krb5int_thread_support_init, krb5int_thread_support_fini): If
+ SHOW_INITFINI_FUNCS is defined, print some tracing messages.
+
2005-01-18 Ken Raeburn <raeburn@mit.edu>
* threads.c (k5_key_delete) [ENABLE_THREADS && !_WIN32]: Don't
#else /* POSIX */
- /* Not written yet -- resource leak! */
- /* abort(); */
+ {
+ int err;
+
+ /* XXX RESOURCE LEAK:
+
+ Need to destroy the allocated objects first! */
+
+ err = k5_mutex_lock(&key_lock);
+ if (err == 0) {
+ assert(destructors_set[keynum] == 1);
+ destructors_set[keynum] = 0;
+ destructors[keynum] = NULL;
+ k5_mutex_unlock(&key_lock);
+ }
+ }
#endif
{
int err;
+#ifdef SHOW_INITFINI_FUNCS
+ printf("krb5int_thread_support_init\n");
+#endif
+
#ifdef DEBUG_THREADS_STATS
/* stats_logfile = stderr; */
stats_logfile = fopen("/dev/tty", "w+");
if (! INITIALIZER_RAN (krb5int_thread_support_init))
return;
+#ifdef SHOW_INITFINI_FUNCS
+ printf("krb5int_thread_support_fini\n");
+#endif
+
#ifndef ENABLE_THREADS
/* Do nothing. */