Hans Leidekker : wininet: Clean up locks after closing libssl and libcrypto .
Alexandre Julliard
julliard at winehq.org
Tue Oct 27 09:46:30 CDT 2009
Module: wine
Branch: master
Commit: 248939d358790c953dc7b002ae800e36b7c883e1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=248939d358790c953dc7b002ae800e36b7c883e1
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Oct 27 10:04:20 2009 +0100
wininet: Clean up locks after closing libssl and libcrypto.
Found by valgrind.
---
dlls/wininet/netconnection.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index 97c764f..16cce40 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -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
}
More information about the wine-cvs
mailing list