Skip to content

Commit 89e56f4

Browse files
committed
add constant null check
1 parent ff314ba commit 89e56f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Python/flowgraph.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,9 @@ fold_constant_intrinsic_list_to_tuple(basicblock *bb, int i,
15211521
goto exit;
15221522
}
15231523
PyObject *constant = get_const_value(instr->i_opcode, instr->i_oparg, consts);
1524+
if (constant == NULL) {
1525+
goto error;
1526+
}
15241527
int r = PyList_Append(list, constant);
15251528
Py_DECREF(constant);
15261529
if (r < 0) {

0 commit comments

Comments
 (0)