# Bug report ### Bug description: Some `PyMem_Realloc()` / `PyMem_RawRealloc()` calls overwrite the original pointer directly. If realloc fails, the old pointer is still valid, but it can be lost and leaked. See the comming PR for detail. This is found using Claude Code. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-149932 * gh-150439 * gh-150476 <!-- /gh-linked-prs -->
Activity
gh-149931: Fix memory leaks on failed realloc (#149932)
[3.15] gh-149931: Fix memory leaks on failed realloc (GH-149932) (#15…
[3.14] gh-149931: Fix memory leaks on failed realloc (#150476)