Skip to content

Commit b3a2aeb

Browse files
committed
check frozenset return
1 parent deb62c0 commit b3a2aeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/flowgraph.c

+4
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,10 @@ optimize_if_const_list_or_set_iter(basicblock *bb, int n,
15801580
}
15811581
if (instr->i_opcode == BUILD_SET) {
15821582
PyObject *frozenset = PyFrozenSet_New(newconst);
1583+
if (frozenset == NULL) {
1584+
Py_DECREF(newconst);
1585+
return ERROR;
1586+
}
15831587
Py_SETREF(newconst, frozenset);
15841588
}
15851589
int index = add_const(newconst, consts, const_cache);

0 commit comments

Comments
 (0)