Commit 1dce5ed3 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Free root store when quitting.

parent d8fb290e
...@@ -126,6 +126,7 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void); ...@@ -126,6 +126,7 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void);
void crypt_oid_init(HINSTANCE hinst); void crypt_oid_init(HINSTANCE hinst);
void crypt_oid_free(void); void crypt_oid_free(void);
void crypt_sip_free(void); void crypt_sip_free(void);
void root_store_free(void);
void default_chain_engine_free(void); void default_chain_engine_free(void);
/* Some typedefs that make it easier to abstract which type of context we're /* Some typedefs that make it easier to abstract which type of context we're
......
...@@ -45,6 +45,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) ...@@ -45,6 +45,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
crypt_oid_free(); crypt_oid_free();
crypt_sip_free(); crypt_sip_free();
root_store_free();
default_chain_engine_free(); default_chain_engine_free();
if (hDefProv) CryptReleaseContext(hDefProv, 0); if (hDefProv) CryptReleaseContext(hDefProv, 0);
break; break;
......
...@@ -504,3 +504,8 @@ PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) ...@@ -504,3 +504,8 @@ PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags)
CertDuplicateStore(CRYPT_rootStore); CertDuplicateStore(CRYPT_rootStore);
return CRYPT_rootStore; return CRYPT_rootStore;
} }
void root_store_free(void)
{
CertCloseStore(CRYPT_rootStore, 0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment