summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_ssl.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 3d46a10..f78a31e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -390,6 +390,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 #13245: sched.scheduler class constructor's timefunc and
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index dcde4ff..5772d90 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -707,6 +707,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) {