[Python-checkins] cpython (3.2): Issue #13458: Fix a memory leak in the ssl module when decoding a certificate

antoine.pitrou python-checkins at python.org
Wed Nov 23 01:49:51 CET 2011


http://hg.python.org/cpython/rev/80d491aaeed2
changeset:   73711:80d491aaeed2
branch:      3.2
parent:      73707:2e5506d9a079
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Wed Nov 23 01:39:19 2011 +0100
summary:
  Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName.
Patch by Robert Xiao.

files:
  Misc/NEWS      |  3 +++
  Modules/_ssl.c |  1 +
  2 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,9 @@
 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
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -679,6 +679,7 @@
             }
             Py_DECREF(t);
         }
+        sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free);
     }
     BIO_free(biobuf);
     if (peer_alt_names != Py_None) {

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list