Module: wine Branch: master Commit: e078c872a07e40b12b865bb26583ff9f9c5ca749 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e078c872a07e40b12b865bb265...
Author: Frédéric Delanoy frederic.delanoy@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;