bpo-29738: Fix memory leak in _get_crl_dp#526
Conversation
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Use `sk_DIST_POINT_pop_free` instead of `sk_DIST_POINT_free` since the latter doesn't free the individual elements of the stack * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow these steps to rectify the issue:
Thanks again to your contribution and we look forward to looking at it! |
Sorry, something went wrong.
|
@olivielpeau, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tiran, @Yhg1s, @loewis, @serhiy-storchaka and @Haypo to be potential reviewers. |
Sorry, something went wrong.
alex
left a comment
There was a problem hiding this comment.
This looks correct to me.
I can't remember the rules for merging and backports, so I'm hoping another core dev will actually land :-)
Sorry, something went wrong.
tiran
left a comment
There was a problem hiding this comment.
CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL.
Sorry, something went wrong.
Addresses PR review. CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL.
|
@tiran Thanks for the review! I've addressed your comment, let me know if this looks good now |
Sorry, something went wrong.
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc3)
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc3)
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc3)
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc3)
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc3)
* Remove conditional on free of `dps`, since `dps` is now allocated for all versions of OpenSSL * Remove call to `x509_check_ca` since it was only used to cache the `crldp` field of the certificate CRL_DIST_POINTS_free is available in all supported versions of OpenSSL (recent 0.9.8+) and LibreSSL. (cherry picked from commit 2849cc3)
|
Thanks @olivielpeau and congrats for your first contribution to CPython 🎉 |
Sorry, something went wrong.
dps, sincedpsis now allocated forall versions of OpenSSL
sk_DIST_POINT_pop_freeinstead ofsk_DIST_POINT_freesincethe latter doesn't free the individual elements of the stack
x509_check_casince it was only used to cachethe
crldpfield of the certificate