]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix last leak detected by Valgrind
[stockfish] / src / search.cpp
index e521b86849facadb45b4abfca262fd2331fb8f82..6b943b53793ffc0ac9eefaf0e097a05a1af608da 100644 (file)
@@ -2336,6 +2336,7 @@ split_point_start: // At split points actual search starts from here
 #if !defined(_MSC_VER)
         pthread_t pthread[1];
         ok = (pthread_create(pthread, NULL, init_thread, (void*)(&i)) == 0);
+        pthread_detach(pthread[0]);
 #else
         ok = (CreateThread(NULL, 0, init_thread, (LPVOID)(&i), 0, NULL) != NULL);
 #endif