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

This commit is contained in:
Frédéric Delanoy 2012-10-29 21:17:31 +01:00 committed by Alexandre Julliard
parent 3dd7c64c25
commit e078c872a0
1 changed files with 3 additions and 0 deletions

View File

@ -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;