[lsan] Fix Darwin build
authorVitaly Buka <vitalybuka@google.com>
Mon, 17 Apr 2023 23:35:19 +0000 (16:35 -0700)
committerVitaly Buka <vitalybuka@google.com>
Mon, 17 Apr 2023 23:35:47 +0000 (16:35 -0700)
compiler-rt/lib/lsan/lsan_common_mac.cpp

index 79cc987..9ccf098 100644 (file)
@@ -63,7 +63,7 @@ static pthread_once_t key_once = PTHREAD_ONCE_INIT;
 // so we can't destroy it until it's been used and reset.
 void restore_tid_data(void *ptr) {
   thread_local_data_t *data = (thread_local_data_t *)ptr;
-  if (data->current_thread_id)
+  if (data->current_thread)
     pthread_setspecific(key, data);
 }