Skip to content

Commit 23b35a5

Browse files
committed
gh-151126: Fix missing PyErr_NoMemory() in remove_unused_consts
1 parent f051c68 commit 23b35a5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/flowgraph.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3279,6 +3279,7 @@ remove_unused_consts(basicblock *entryblock, PyObject *consts)
32793279

32803280
index_map = PyMem_Malloc(nconsts * sizeof(Py_ssize_t));
32813281
if (index_map == NULL) {
3282+
PyErr_NoMemory();
32823283
goto end;
32833284
}
32843285
for (Py_ssize_t i = 1; i < nconsts; i++) {

0 commit comments

Comments
 (0)