summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-01-12 20:44:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-01-12 20:44:33 (GMT)
commit1e37e9efa9f3306cd562b61b7248e4a162ccc897 (patch)
tree0ebe456d241deebf2a91a9900495a29dbf876d51 /Modules
parent14d080eaa19cb2936a68c06674558b29c8858b0c (diff)
parent457a2292caf46435ad544f865777a017e71a780a (diff)
downloadcpython-1e37e9efa9f3306cd562b61b7248e4a162ccc897.zip
cpython-1e37e9efa9f3306cd562b61b7248e4a162ccc897.tar.gz
cpython-1e37e9efa9f3306cd562b61b7248e4a162ccc897.tar.bz2
SSLContext.load_dh_params() now properly closes the input file.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 0de541c..8212cd1 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2248,6 +2248,7 @@ load_dh_params(PySSLContext *self, PyObject *filepath)
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) {