mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Fix UNIX-specific thread handle leak.
This commit is contained in:
parent
36cd1ad5c9
commit
67ed7d9d49
1 changed files with 3 additions and 0 deletions
|
@ -623,7 +623,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa
|
||||||
return (pthread_t)0;
|
return (pthread_t)0;
|
||||||
}
|
}
|
||||||
if (!fWantHandle)
|
if (!fWantHandle)
|
||||||
|
{
|
||||||
|
pthread_detach(hthread);
|
||||||
return (pthread_t)-1;
|
return (pthread_t)-1;
|
||||||
|
}
|
||||||
return hthread;
|
return hthread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue