]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue21393 Use CryptReleaseContext to release Crypt handle on Windows
authorTim Golden <mail@timgolden.me.uk>
Tue, 6 May 2014 12:29:45 +0000 (13:29 +0100)
committerTim Golden <mail@timgolden.me.uk>
Tue, 6 May 2014 12:29:45 +0000 (13:29 +0100)
Python/random.c

index b04d205a46fe566d8b2911ec2074ee5d576e9f9d..a052b657251c25b1f6bb65fd347fed2d10e8c814 100644 (file)
@@ -298,7 +298,7 @@ _PyRandom_Fini(void)
 {
 #ifdef MS_WINDOWS
     if (hCryptProv) {
-        CloseHandle(hCryptProv);
+        CryptReleaseContext(hCryptProv, 0);
         hCryptProv = 0;
     }
 #else