commit | 457a2292caf46435ad544f865777a017e71a780a | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sat Jan 12 21:43:45 2013 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sat Jan 12 21:43:45 2013 +0100 |
tree | c6eb9df42e9caf7f3f5d81ad8b9d78c7858f8995 | |
parent | 69db587f86cb1a742561c5afebae67b58761420e [diff] [blame] |
SSLContext.load_dh_params() now properly closes the input file.
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 @@ 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) {