crypt32: Free root store when quitting.
This commit is contained in:
parent
d8fb290ee1
commit
1dce5ed3b0
|
@ -126,6 +126,7 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void);
|
|||
void crypt_oid_init(HINSTANCE hinst);
|
||||
void crypt_oid_free(void);
|
||||
void crypt_sip_free(void);
|
||||
void root_store_free(void);
|
||||
void default_chain_engine_free(void);
|
||||
|
||||
/* 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)
|
|||
case DLL_PROCESS_DETACH:
|
||||
crypt_oid_free();
|
||||
crypt_sip_free();
|
||||
root_store_free();
|
||||
default_chain_engine_free();
|
||||
if (hDefProv) CryptReleaseContext(hDefProv, 0);
|
||||
break;
|
||||
|
|
|
@ -504,3 +504,8 @@ PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags)
|
|||
CertDuplicateStore(CRYPT_rootStore);
|
||||
return CRYPT_rootStore;
|
||||
}
|
||||
|
||||
void root_store_free(void)
|
||||
{
|
||||
CertCloseStore(CRYPT_rootStore, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue