Module: wine Branch: master Commit: 027236b04f83f9d8f4b14bc29ab5e501ec0e0048 URL: http://source.winehq.org/git/wine.git/?a=commit;h=027236b04f83f9d8f4b14bc29a...
Author: Juan Lang juan.lang@gmail.com Date: Mon Jan 14 11:14:11 2008 -0800
crypt32: Don't release default crypto provider on process shutdown.
---
dlls/crypt32/main.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index 727246e..fa90ee0 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -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;