changeset: 99145:858cb1538531 parent: 99139:1412be96faf0 parent: 99144:6c733337afae user: Benjamin Peterson date: Sat Nov 14 15:14:58 2015 -0800 files: Misc/NEWS description: merge 3.5 (#25578) diff -r 1412be96faf0 -r 858cb1538531 Misc/NEWS --- a/Misc/NEWS Sat Nov 14 15:42:17 2015 +0200 +++ b/Misc/NEWS Sat Nov 14 15:14:58 2015 -0800 @@ -255,6 +255,8 @@ - Issue #13248: Remove deprecated inspect.getargspec and inspect.getmoduleinfo functions. +- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer(). + - Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating ssl.SSLContext. diff -r 1412be96faf0 -r 858cb1538531 Modules/_ssl.c --- a/Modules/_ssl.c Sat Nov 14 15:42:17 2015 +0200 +++ b/Modules/_ssl.c Sat Nov 14 15:14:58 2015 -0800 @@ -1017,7 +1017,10 @@ AUTHORITY_INFO_ACCESS *info; info = X509_get_ext_d2i(certificate, NID_info_access, NULL, NULL); - if ((info == NULL) || (sk_ACCESS_DESCRIPTION_num(info) == 0)) { + if (info == NULL) + return Py_None; + if (sk_ACCESS_DESCRIPTION_num(info) == 0) { + AUTHORITY_INFO_ACCESS_free(info); return Py_None; } @@ -3967,7 +3970,7 @@ else if ((target = PyUnicode_DecodeFSDefault(tmp)) == NULL) { \ target = PyBytes_FromString(tmp); } \ if (!target) goto error; \ - } + } CONVERT(X509_get_default_cert_file_env(), ofile_env); CONVERT(X509_get_default_cert_file(), ofile);