From fc14728efcc631838956ddb9c4e5014065eccc91 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 1 Nov 2007 09:30:26 -0700 Subject: [PATCH] crypt32: Fix a leak during chain creation. --- dlls/crypt32/chain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 068e039dd62..53588f8fbb8 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -913,6 +913,10 @@ static BOOL CRYPT_BuildSimpleChain(PCertificateChainEngine engine, if (issuer) { ret = CRYPT_AddCertToSimpleChain(engine, chain, issuer, infoStatus); + /* CRYPT_AddCertToSimpleChain add-ref's the issuer, so free it to + * close the enumeration that found it + */ + CertFreeCertificateContext(issuer); cert = issuer; } else