]> granicus.if.org Git - python/commitdiff
Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with...
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 23 Nov 2011 00:39:19 +0000 (01:39 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 23 Nov 2011 00:39:19 +0000 (01:39 +0100)
Patch by Robert Xiao.

Misc/NEWS
Modules/_ssl.c

index 1a92e2ad95fc41cf79f024ca22fe7685dfe88577..be93de46d8380ce50d26ae035f5cde87ea07c6d6 100644 (file)
--- 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
index dd616608174dd493d1275ca158d7c6ba9917898c..becf6a50b3d0ff2816ec7c45d2dd4e4462203a24 100644 (file)
@@ -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) {