winhttp: Clean up locks after closing libssl and libcrypto.
SSL_CTX_free() triggers a call to the locking callback. Found by valgrind.
This commit is contained in:
parent
e62fdaf0f1
commit
629fd8fcbc
|
@ -316,13 +316,6 @@ void netconn_unload( void )
|
||||||
#if defined(SONAME_LIBSSL) && defined(SONAME_LIBCRYPTO)
|
#if defined(SONAME_LIBSSL) && defined(SONAME_LIBCRYPTO)
|
||||||
if (libcrypto_handle)
|
if (libcrypto_handle)
|
||||||
{
|
{
|
||||||
if (ssl_locks)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < num_ssl_locks; i++) DeleteCriticalSection( &ssl_locks[i] );
|
|
||||||
HeapFree( GetProcessHeap(), 0, ssl_locks );
|
|
||||||
}
|
|
||||||
wine_dlclose( libcrypto_handle, NULL, 0 );
|
wine_dlclose( libcrypto_handle, NULL, 0 );
|
||||||
}
|
}
|
||||||
if (libssl_handle)
|
if (libssl_handle)
|
||||||
|
@ -331,6 +324,12 @@ void netconn_unload( void )
|
||||||
pSSL_CTX_free( ctx );
|
pSSL_CTX_free( ctx );
|
||||||
wine_dlclose( libssl_handle, NULL, 0 );
|
wine_dlclose( libssl_handle, NULL, 0 );
|
||||||
}
|
}
|
||||||
|
if (ssl_locks)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < num_ssl_locks; i++) DeleteCriticalSection( &ssl_locks[i] );
|
||||||
|
HeapFree( GetProcessHeap(), 0, ssl_locks );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue