crypt32: Don't release default crypto provider on process shutdown.

This commit is contained in:
Juan Lang 2008-01-14 11:14:11 -08:00 committed by Alexandre Julliard
parent 14a12b8861
commit 027236b04f
1 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
crypt_sip_free();
root_store_free();
default_chain_engine_free();
if (hDefProv) CryptReleaseContext(hDefProv, 0);
/* 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);
break;
}
return TRUE;