Issue21393 Use CryptReleaseContext to release Crypt handle on Windows

This commit is contained in:
Tim Golden 2014-05-06 13:29:45 +01:00
parent e0bd2c5fad
commit b8ac3e1a20

View file

@ -298,7 +298,7 @@ _PyRandom_Fini(void)
{ {
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
if (hCryptProv) { if (hCryptProv) {
CloseHandle(hCryptProv); CryptReleaseContext(hCryptProv, 0);
hCryptProv = 0; hCryptProv = 0;
} }
#else #else