SIGN IN SIGN UP

[3.13] gh-127667: fix memory leaks in `hashlib` (GH-127668) (#130784)

gh-127667: fix memory leaks in `hashlib` (GH-127668)

- Correctly handle `NULL` values returned by `EVP_MD_CTX_md`.
- Correctly free resources in error branches.
- Consistently suppress `_setException()` return value when needed.
- Collapse `_setException() + return NULL` into a single statement.

(cherry-picked from commit 097846502b7f33cb327d512e2a396acf4f4de46e)
B
Bénédikt Tran committed
9643ce9019c9f01a0e5d773d3abddb79471fa19a
Parent: 36e6967
Committed by GitHub <noreply@github.com> on 3/3/2025, 11:01:01 AM