From: Antoine Pitrou Date: Wed, 23 Nov 2011 00:39:19 +0000 (+0100) Subject: Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa1c967f93e7cbc28c964369af13c3e444407a22;p=python Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName. Patch by Robert Xiao. --- diff --git a/Misc/NEWS b/Misc/NEWS index 1a92e2ad95..be93de46d8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -79,6 +79,9 @@ Core and Builtins Library ------- +- Issue #13458: Fix a memory leak in the ssl module when decoding a + certificate with a subjectAltName. Patch by Robert Xiao. + - Issue #13415: os.unsetenv() doesn't ignore errors anymore. - Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is diff --git a/Modules/_ssl.c b/Modules/_ssl.c index dd61660817..becf6a50b3 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -798,6 +798,7 @@ _get_peer_alt_names (X509 *certificate) { } Py_DECREF(t); } + sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free); } BIO_free(biobuf); if (peer_alt_names != Py_None) {