Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix optimize_if_const_subscr refleaks
  • Loading branch information
WolframAlph committed Feb 4, 2025
commit 283fd585d8cb4187962822589cd1e28d3cc95e08
2 changes: 2 additions & 0 deletions Python/flowgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,8 @@ optimize_if_const_subscr(basicblock *bb, int n, PyObject *consts, PyObject *cons
return ERROR;
}
PyObject *newconst = PyObject_GetItem(o, key);
Py_DECREF(o);
Py_DECREF(key);
if (newconst == NULL) {
if (PyErr_ExceptionMatches(PyExc_KeyboardInterrupt)) {
return ERROR;
Expand Down
Loading