]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-140530: fix a reference leak in an error path for `raise exc from cause...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 9 Nov 2025 16:04:26 +0000 (17:04 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Nov 2025 16:04:26 +0000 (17:04 +0100)
commitd7aace78e96044d83608d19fdef23f818134f300
tree3009ed5a1b235a6def5d32b5e440eaf5825ef6c8
parentcb458715a6e52d83ddb3173ef1d7d3aa20c242d5
[3.14] gh-140530: fix a reference leak in an error path for `raise exc from cause` (GH-140908) (#141282)

gh-140530: fix a reference leak in an error path for `raise exc from cause` (GH-140908)

Fix a reference leak in `raise E from T` when `T` is an exception
subtype for which `T.__new__` does not return an exception instance.
(cherry picked from commit 0c77e7c23b5c270a3142105542c56c59b59c52a0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Lib/test/test_raise.py
Misc/NEWS.d/next/Core_and_Builtins/2025-11-02-12-47-38.gh-issue-140530.S934bp.rst [new file with mode: 0644]
Python/ceval.c