From b7cdc0afde7bd592e6a6744e8728e6ca2f152331 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 15 May 2013 10:26:18 +0200 Subject: [PATCH] secur32: Don't bother to free memory at process exit. --- dlls/secur32/secur32.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index c656dee345d..acb09cf3399 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -1177,15 +1177,16 @@ BOOLEAN WINAPI TranslateNameW( /*********************************************************************** * DllMain (SECUR32.0) */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) { - if (fdwReason == DLL_PROCESS_ATTACH) + switch (reason) { + case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); SECUR32_initializeProviders(); - } - else if (fdwReason == DLL_PROCESS_DETACH) - { + break; + case DLL_PROCESS_DETACH: + if (reserved) break; SECUR32_freeProviders(); }