From 99bf9ee8e0b3665aae175be56acaf53b3b6111d9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 15 May 2013 10:16:05 +0200 Subject: [PATCH] crypt32: Don't bother to free memory at process exit. --- dlls/crypt32/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index db9dc1a946a..78f14f901d7 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;