mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
[3.11] gh-109216: Fix possible memory leak in BUILD_MAP
(#109323)
* [3.11] gh-109216: Fix possible memory leak in `BUILD_MAP` * Add NEWS * Update Python/ceval.c Co-authored-by: Kumar Aditya <kumaraditya@python.org> --------- Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
c9214b90f4
commit
e16922f070
2 changed files with 5 additions and 2 deletions
|
@ -3318,13 +3318,14 @@ handle_eval_breaker:
|
|||
&PEEK(2*oparg), 2,
|
||||
&PEEK(2*oparg - 1), 2,
|
||||
oparg);
|
||||
if (map == NULL)
|
||||
goto error;
|
||||
|
||||
while (oparg--) {
|
||||
Py_DECREF(POP());
|
||||
Py_DECREF(POP());
|
||||
}
|
||||
if (map == NULL) {
|
||||
goto error;
|
||||
}
|
||||
PUSH(map);
|
||||
DISPATCH();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue