summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-01-12 20:43:45 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-01-12 20:43:45 (GMT)
commit457a2292caf46435ad544f865777a017e71a780a (patch)
treec6eb9df42e9caf7f3f5d81ad8b9d78c7858f8995 /Modules/_ssl.c
parent69db587f86cb1a742561c5afebae67b58761420e (diff)
downloadcpython-457a2292caf46435ad544f865777a017e71a780a.zip
cpython-457a2292caf46435ad544f865777a017e71a780a.tar.gz
cpython-457a2292caf46435ad544f865777a017e71a780a.tar.bz2
SSLContext.load_dh_params() now properly closes the input file.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index ad22c52..abb48b9 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2177,6 +2177,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) {