crypt32: Fix a leak building an alternate chain.

This commit is contained in:
Juan Lang 2007-11-01 09:39:33 -07:00 committed by Alexandre Julliard
parent e94ce8a0b2
commit 329761e7e1
1 changed files with 4 additions and 0 deletions

View File

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