November 23, 2018 7:07 AM, "Jacek Caban" jacek@codeweavers.com wrote:
Hi Hans,
On 11/23/18 11:35 AM, Hans Leidekker wrote:
@@ -1495,7 +1492,7 @@ static DWORD WINAPI connection_collector(void *arg) LeaveCriticalSection(&connection_pool_cs); } while(remaining_connections);
- FreeLibraryAndExitThread( winhttp_instance, 0 );
- FreeLibrary( winhttp_instance );
If winhttp_instance is the last instance of winhttp.dll, FreeLibrary will return back to code that is has just unloaded.
You want to use FreeLibraryWhenCallbackReturns() here.
Jacek
Chip