[PATCH] crypt32: Fix a leak on error path (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Sun Jan 10 12:19:35 CST 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/crypt32/chain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 056910f..aab2e91 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -2293,7 +2293,10 @@ static BOOL CRYPT_BuildCandidateChainFromCert(CertificateChainEngine *engine,
             chain->context.dwRevocationFreshnessTime = 0;
         }
         else
+        {
+            CRYPT_FreeSimpleChain(simpleChain);
             ret = FALSE;
+        }
         *ppChain = chain;
     }
     return ret;
-- 
2.6.4




More information about the wine-patches mailing list