Make sure not to interfere with the lasterror value returned by the
CSP in CryptAcquireContextA.
This commit is contained in:
parent
91207428fb
commit
8ea4fffb98
@ -478,13 +478,19 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
|
|||||||
error:
|
error:
|
||||||
if (pProv)
|
if (pProv)
|
||||||
{
|
{
|
||||||
|
if (pProv->hModule)
|
||||||
FreeLibrary(pProv->hModule);
|
FreeLibrary(pProv->hModule);
|
||||||
|
if (pProv->pVTable)
|
||||||
CRYPT_Free(pProv->pVTable);
|
CRYPT_Free(pProv->pVTable);
|
||||||
|
if (pProv->pFuncs)
|
||||||
CRYPT_Free(pProv->pFuncs);
|
CRYPT_Free(pProv->pFuncs);
|
||||||
CRYPT_Free(pProv);
|
CRYPT_Free(pProv);
|
||||||
}
|
}
|
||||||
|
if (provname)
|
||||||
CRYPT_Free(provname);
|
CRYPT_Free(provname);
|
||||||
|
if (temp)
|
||||||
CRYPT_Free(temp);
|
CRYPT_Free(temp);
|
||||||
|
if (imagepath)
|
||||||
CRYPT_Free(imagepath);
|
CRYPT_Free(imagepath);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user