diff options
| author | JoelKatz <[email protected]> | 2011-07-25 15:06:45 -0700 |
|---|---|---|
| committer | JoelKatz <[email protected]> | 2011-07-25 15:06:45 -0700 |
| commit | 67ed7d9d4929d8fe1c5f976c184c72dff02d83b7 (patch) | |
| tree | 41c5d99983e179c05a9a71beceb7e2865869c746 /src | |
| parent | Merge pull request #411 from TheBlueMatt/master (diff) | |
| download | discoin-67ed7d9d4929d8fe1c5f976c184c72dff02d83b7.tar.xz discoin-67ed7d9d4929d8fe1c5f976c184c72dff02d83b7.zip | |
Fix UNIX-specific thread handle leak.
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 9922ba82a..8588201da 100644 --- a/src/util.h +++ b/src/util.h @@ -623,7 +623,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa return (pthread_t)0; } if (!fWantHandle) + { + pthread_detach(hthread); return (pthread_t)-1; + } return hthread; } |