On 10/27/2009 10:04 AM, Hans Leidekker wrote:
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
  }

Hi Hans,

I was checking a crash in an installer (the AkamaiDownloadManager to download CS4 for example) and it looks like we are accessing a ssl function CRYPTO_num_locks() after we've closed the library?

Can you confirm this?

--
Cheers,

Paul.


Reply via email to