Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8ac3e1

Browse files
committed
Issue21393 Use CryptReleaseContext to release Crypt handle on Windows
1 parent e0bd2c5 commit b8ac3e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ _PyRandom_Fini(void)
298298
{
299299
#ifdef MS_WINDOWS
300300
if (hCryptProv) {
301-
CloseHandle(hCryptProv);
301+
CryptReleaseContext(hCryptProv, 0);
302302
hCryptProv = 0;
303303
}
304304
#else

0 commit comments

Comments
 (0)