diff -r 54d4290f0ec6 Modules/_ssl.c --- a/Modules/_ssl.c Fri Nov 06 17:01:48 2015 +0100 +++ b/Modules/_ssl.c Fri Nov 06 15:46:32 2015 -0500 @@ -1084,6 +1084,9 @@ } if ((lst = PyList_New(0)) == NULL) { +#if OPENSSL_VERSION_NUMBER < 0x10001000L + sk_DIST_POINT_free(dps); +#endif return NULL; } @@ -1108,12 +1111,18 @@ uri->length); if (ouri == NULL) { Py_DECREF(lst); +#if OPENSSL_VERSION_NUMBER < 0x10001000L + sk_DIST_POINT_free(dps); +#endif return NULL; } result = PyList_Append(lst, ouri); Py_DECREF(ouri); if (result < 0) { Py_DECREF(lst); +#if OPENSSL_VERSION_NUMBER < 0x10001000L + sk_DIST_POINT_free(dps); +#endif return NULL; } } @@ -1121,11 +1130,17 @@ /* convert to tuple or None */ if (PyList_Size(lst) == 0) { Py_DECREF(lst); +#if OPENSSL_VERSION_NUMBER < 0x10001000L + sk_DIST_POINT_free(dps); +#endif return Py_None; } else { PyObject *tup; tup = PyList_AsTuple(lst); Py_DECREF(lst); +#if OPENSSL_VERSION_NUMBER < 0x10001000L + sk_DIST_POINT_free(dps); +#endif return tup; } }