Skip to content

Commit c9efd89

Browse files
Update 2026-04-10-16-19-23.gh-issue-148263.trqp3-.rst
1 parent 39cbf1f commit c9efd89

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
Fix refcount leak in weakref proxy operations: When a weakref proxy was used in binary,
2-
ternary, or rich comparison operations and the second argument turned out to be a dead
3-
proxy, the first argument's reference count was already incremented by the unwrap step
4-
but never released, causing a memory leak.This patch replaces the old UNWRAP macro with
5-
a proper inline function _proxy_unwrap() that tracks whether each argument was incref'd,
6-
and introduces cleanup paths (goto clean_up) that correctly decref any already-acquired
7-
references before returning NULL on failure. Also added reference cleanup in unary and
8-
compare operations.
1+
Fix reference count leak in weakref proxy operations when a dead proxy is encountered as the second argument.

0 commit comments

Comments
 (0)