crypt32: Free root store when quitting.

oldstable
Juan Lang 2007-10-18 21:50:46 -07:00 committed by Alexandre Julliard
parent d8fb290ee1
commit 1dce5ed3b0
3 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);
}