Commit 51c39f9
committed
gh-146152: Fix memory leak in _json encoder recursion path
Only clean up markers on the RecursionError path (PATH B), where
objects accumulate during stack unwinding. Other error paths are
safe because the markers dict is local and will be freed.
Based on review feedback from @raminfp and @serhiy-storchaka.1 parent 91e1312 commit 51c39f9
File tree
2 files changed
+9
-1
lines changed- Misc/NEWS.d/next/Library
- Modules
2 files changed
+9
-1
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
1635 | 1639 | | |
1636 | | - | |
| 1640 | + | |
1637 | 1641 | | |
1638 | 1642 | | |
1639 | 1643 | | |
| |||
1642 | 1646 | | |
1643 | 1647 | | |
1644 | 1648 | | |
| 1649 | + | |
1645 | 1650 | | |
1646 | 1651 | | |
1647 | 1652 | | |
| |||
0 commit comments