]> 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 635081827508070df3e6b3cf273a08b496d5e487..f65fafe2eaffaccb320efed0f378dc2d0217a768 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,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 84ec477aaa9574ad79f2becbc62ed37238ca12c4..5419059e299876536d93193a7a7afae1542ece1a 100644 (file)
@@ -679,6 +679,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) {