Merge pull request #3147 from animalize/dev

fix leaking thread handles on Windows
This commit is contained in:
Nick Terrell
2022-06-02 10:04:55 -07:00
committed by GitHub
+2
View File
@@ -63,6 +63,8 @@ int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr)
if (!thread.handle) return 0;
result = WaitForSingleObject(thread.handle, INFINITE);
CloseHandle(thread.handle);
switch (result) {
case WAIT_OBJECT_0:
if (value_ptr) *value_ptr = thread.arg;