diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index bf73e01c79704..97dca50312e12 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -586,6 +586,7 @@ unregister_thread (void *arg) mono_thread_hazardous_try_free (info, free_thread_info); mono_thread_small_id_free (small_id); + mono_native_tls_set_value (small_id_key, NULL); mono_threads_signal_thread_handle (handle);