Juan Lang : crypt32: Free root store when quitting.

Alexandre Julliard julliard at winehq.org
Fri Oct 19 08:35:48 CDT 2007


Module: wine
Branch: master
Commit: 1dce5ed3b04caa3575194de15ae0813a54551d50
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1dce5ed3b04caa3575194de15ae0813a54551d50

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Oct 18 21:50:46 2007 -0700

crypt32: Free root store when quitting.

---

 dlls/crypt32/crypt32_private.h |    1 +
 dlls/crypt32/main.c            |    1 +
 dlls/crypt32/rootstore.c       |    5 +++++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h
index 8975522..8293e82 100644
--- a/dlls/crypt32/crypt32_private.h
+++ b/dlls/crypt32/crypt32_private.h
@@ -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
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c
index 12f2885..727246e 100644
--- a/dlls/crypt32/main.c
+++ b/dlls/crypt32/main.c
@@ -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;
diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c
index 0bd537d..b96e456 100644
--- a/dlls/crypt32/rootstore.c
+++ b/dlls/crypt32/rootstore.c
@@ -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);
+}




More information about the wine-cvs mailing list