Juan Lang : crypt32: Fix a leak building an alternate chain.

Alexandre Julliard julliard at winehq.org
Fri Nov 2 08:10:19 CDT 2007


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Nov  1 09:39:33 2007 -0700

crypt32: Fix a leak building an alternate chain.

---

 dlls/crypt32/chain.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 53588f8..5724541 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -1197,6 +1197,10 @@ static PCertificateChain CRYPT_BuildAlternateContextFromChain(
                 BOOL ret = CRYPT_AddCertToSimpleChain(engine,
                  alternate->context.rgpChain[i], alternateIssuer, infoStatus);
 
+                /* CRYPT_AddCertToSimpleChain add-ref's the issuer, so free it
+                 * to close the enumeration that found it
+                 */
+                CertFreeCertificateContext(alternateIssuer);
                 if (ret)
                 {
                     ret = CRYPT_BuildSimpleChain(engine, alternate->world,




More information about the wine-cvs mailing list