From 5d6feab0e2aba6f71679df24f46c0251e63f2f7b Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 18 Oct 2007 20:44:18 -0700 Subject: [PATCH] crypt32: Don't keep a pointer to the lower quality chains when choosing a higher quality one, otherwise they'll get double-freed. --- dlls/crypt32/chain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index ff555bbc6c4..9832f0e7f02 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -1272,6 +1272,8 @@ static PCertificateChain CRYPT_ChooseHighestQualityChain( chain->context.rgpLowerQualityChainContext; alternate->context.rgpLowerQualityChainContext[i] = (PCCERT_CHAIN_CONTEXT)chain; + chain->context.cLowerQualityChainContext = 0; + chain->context.rgpLowerQualityChainContext = NULL; chain = alternate; } }