crypt32: Fix a leak during chain creation.

This commit is contained in:
Juan Lang 2007-11-01 09:30:26 -07:00 committed by Alexandre Julliard
parent 4690a9c800
commit fc14728efc
1 changed files with 4 additions and 0 deletions

View File

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