Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Bug report
InParse/parse.c, function_loop0_1_rule (line 23809), object_children
if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); if (!_new_children) { p->error_indicator = 1; PyErr_NoMemory(); p->level--; return NULL; } _children = _new_children; }IfPyMem_Realloc fails, the original object will be kept untouched. Thus returning NULL without free'ing_children will cause a memory leak.
Your environment
Python 3.12
Linked PRs
- gh-101046: fix a potential memory leak in parser.c #101049
- gh-101046: Fix a potential memory leak in the parser when raising MemoryError #101051
- [3.11] gh-101046: Fix a potential memory leak in the parser when raising MemoryError (GH-101051) #101085
- [3.10] gh-101046: Fix a potential memory leak in the parser when raising MemoryError (GH-101051). #101086