File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Misc/NEWS.d/next/Core_and_Builtins Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments