bpo-29738: Fix memory leak in _get_crl_dp by olivielpeau · Pull Request #526 · python/cpython
#if OPENSSL_VERSION_NUMBER >= 0x10001000L /* Calls x509v3_cache_extensions and sets up crldp */ X509_check_ca(certificate); #endif dps = X509_get_ext_d2i(certificate, NID_crl_distribution_points, NULL, NULL);
if (dps == NULL)
done: Py_XDECREF(lst); #if OPENSSL_VERSION_NUMBER < 0x10001000L sk_DIST_POINT_free(dps); #endif CRL_DIST_POINTS_free(dps); return res; }