[Python-checkins] cpython (merge 3.2 -> default): 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:52 CET 2011


http://hg.python.org/cpython/rev/3b5fef34c8c7
changeset:   73712:3b5fef34c8c7
parent:      73710:6132f46c2ab0
parent:      73711:80d491aaeed2
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Wed Nov 23 01:42:52 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
@@ -390,6 +390,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 #13245: sched.scheduler class constructor's timefunc and
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -707,6 +707,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