wininet: Clean up locks after closing libssl and libcrypto.

Found by valgrind.
This commit is contained in:
Hans Leidekker 2009-10-27 10:04:20 +01:00 committed by Alexandre Julliard
parent 629fd8fcbc
commit 248939d358
1 changed files with 6 additions and 8 deletions

View File

@ -289,14 +289,6 @@ void NETCON_unload(void)
#if defined(SONAME_LIBSSL) && defined(SONAME_LIBCRYPTO)
if (OpenSSL_crypto_handle)
{
if (ssl_locks)
{
int i;
for (i = 0; i < pCRYPTO_num_locks(); i++)
DeleteCriticalSection(&ssl_locks[i]);
HeapFree(GetProcessHeap(), 0, ssl_locks);
}
wine_dlclose(OpenSSL_crypto_handle, NULL, 0);
}
if (OpenSSL_ssl_handle)
@ -305,6 +297,12 @@ void NETCON_unload(void)
pSSL_CTX_free(ctx);
wine_dlclose(OpenSSL_ssl_handle, NULL, 0);
}
if (ssl_locks)
{
int i;
for (i = 0; i < pCRYPTO_num_locks(); i++) DeleteCriticalSection(&ssl_locks[i]);
HeapFree(GetProcessHeap(), 0, ssl_locks);
}
#endif
}