diff --git a/Misc/NEWS b/Misc/NEWS index 77e1377e4453..100854a7a3f9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -379,6 +379,8 @@ Library Extension Modules ----------------- +- Fix memory leak in ssl._ssl._test_decode_cert. + - Issue #9422: Fix memory leak when re-initializing a struct.Struct object. - Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 6ed1a9fd47fb..4619cda60034 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -964,6 +964,7 @@ PySSL_test_decode_certificate (PyObject *mod, PyObject *args) { } retval = _decode_certificate(x, verbose); + X509_free(x); fail0: