Nikolay Sivov : crypt32: Fix a leak on error path (Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 11 08:22:28 CST 2016


Module: wine
Branch: master
Commit: 9608c794c925ddf406d62cd1a3ed02175c2c8098
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9608c794c925ddf406d62cd1a3ed02175c2c8098

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Jan 10 21:19:35 2016 +0300

crypt32: Fix a leak on error path (Coverity).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;




More information about the wine-cvs mailing list