]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140530: fix a reference leak in an error path for `raise exc from cause` (#140908)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sun, 9 Nov 2025 12:41:08 +0000 (13:41 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Nov 2025 12:41:08 +0000 (13:41 +0100)
commit0c77e7c23b5c270a3142105542c56c59b59c52a0
treebc07c6cfdfdbbf94e18e8267b061d7dd6b6a01c1
parent5ba0a1aa1fe386fbc863d3fe8f32dfbfe2b1bded
gh-140530: fix a reference leak in an error path for `raise exc from cause` (#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.
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