Make sure not to interfere with the lasterror value returned by the

CSP in CryptAcquireContextA.
This commit is contained in:
Mike McCormack 2004-09-14 17:43:41 +00:00 committed by Alexandre Julliard
parent 91207428fb
commit 8ea4fffb98
1 changed files with 12 additions and 6 deletions

View File

@ -478,14 +478,20 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
error:
if (pProv)
{
FreeLibrary(pProv->hModule);
CRYPT_Free(pProv->pVTable);
CRYPT_Free(pProv->pFuncs);
if (pProv->hModule)
FreeLibrary(pProv->hModule);
if (pProv->pVTable)
CRYPT_Free(pProv->pVTable);
if (pProv->pFuncs)
CRYPT_Free(pProv->pFuncs);
CRYPT_Free(pProv);
}
CRYPT_Free(provname);
CRYPT_Free(temp);
CRYPT_Free(imagepath);
if (provname)
CRYPT_Free(provname);
if (temp)
CRYPT_Free(temp);
if (imagepath)
CRYPT_Free(imagepath);
return FALSE;
}