=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: crypt32: Avoid double free in CRYPT_LoadSIP on error path (coverity).

Alexandre Julliard julliard at winehq.org
Tue Oct 30 13:27:35 CDT 2012


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Mon Oct 29 21:17:31 2012 +0100

crypt32: Avoid double free in CRYPT_LoadSIP on error path (coverity).

---

 dlls/crypt32/sip.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c
index e43ebc7..4a32cad 100644
--- a/dlls/crypt32/sip.c
+++ b/dlls/crypt32/sip.c
@@ -634,14 +634,17 @@ static BOOL CRYPT_LoadSIP(const GUID *pgSubject)
     if (!sip.pfPut || temp != lib)
         goto error;
     FreeLibrary(temp);
+    temp = NULL;
     sip.pfCreate = CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp);
     if (!sip.pfCreate || temp != lib)
         goto error;
     FreeLibrary(temp);
+    temp = NULL;
     sip.pfVerify = CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp);
     if (!sip.pfVerify || temp != lib)
         goto error;
     FreeLibrary(temp);
+    temp = NULL;
     sip.pfRemove = CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp);
     if (!sip.pfRemove || temp != lib)
         goto error;




More information about the wine-cvs mailing list