[Python-checkins] cpython (merge 3.3 -> default): SSLContext.load_dh_params() now properly closes the input file.
antoine.pitrou
python-checkins at python.org
Sat Jan 12 21:47:15 CET 2013
http://hg.python.org/cpython/rev/44e614446f78
changeset: 81464:44e614446f78
parent: 81462:e22c09f636d4
parent: 81463:523d5b1e3fd5
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sat Jan 12 21:44:33 2013 +0100
summary:
SSLContext.load_dh_params() now properly closes the input file.
files:
Misc/NEWS | 2 ++
Modules/_ssl.c | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -217,6 +217,8 @@
Library
-------
+- SSLContext.load_dh_params() now properly closes the input file.
+
- Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path.
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2248,6 +2248,7 @@
errno = 0;
PySSL_BEGIN_ALLOW_THREADS
dh = PEM_read_DHparams(f, NULL, NULL, NULL);
+ fclose(f);
PySSL_END_ALLOW_THREADS
if (dh == NULL) {
if (errno != 0) {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list