Alexandre Julliard : crypt32: Don't bother to free memory at process exit.

Alexandre Julliard julliard at winehq.org
Wed May 15 14:19:59 CDT 2013


Module: wine
Branch: master
Commit: 99bf9ee8e0b3665aae175be56acaf53b3b6111d9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=99bf9ee8e0b3665aae175be56acaf53b3b6111d9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 15 10:16:05 2013 +0200

crypt32: Don't bother to free memory at process exit.

---

 dlls/crypt32/main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c
index db9dc1a..78f14f9 100644
--- a/dlls/crypt32/main.c
+++ b/dlls/crypt32/main.c
@@ -45,14 +45,12 @@ BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved)
             crypt_oid_init();
             break;
         case DLL_PROCESS_DETACH:
+            if (pvReserved) break;
             crypt_oid_free();
             crypt_sip_free();
             root_store_free();
             default_chain_engine_free();
-            /* Don't release the default provider on process shutdown, there's
-             * no guarantee the provider dll hasn't already been unloaded.
-             */
-            if (hDefProv && !pvReserved) CryptReleaseContext(hDefProv, 0);
+            if (hDefProv) CryptReleaseContext(hDefProv, 0);
             break;
     }
     return TRUE;




More information about the wine-cvs mailing list