Fix build for no FOLLY_TLD_USE_FOLLY_TLS
[folly.git] / folly / detail / ThreadLocalDetail.cpp
index 9e7fda6828716589bd2507caeff6359a0493778b..4a8f2b66d2db0767785d1cbb10aa0cc871ea0430 100644 (file)
@@ -36,7 +36,7 @@ void StaticMetaBase::onThreadExit(void* ptr) {
 
   // Make sure this ThreadEntry is available if ThreadLocal A is accessed in
   // ThreadLocal B destructor.
-  pthread_setspecific(meta.pthreadKey_, threadEntry);
+  pthread_setspecific(meta.pthreadKey_, &(*threadEntry));
   SCOPE_EXIT {
     pthread_setspecific(meta.pthreadKey_, nullptr);
   };