Skip to content

Commit

Permalink
Fix refleak when peepholing branches on None
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher committed Jul 3, 2023
1 parent 5890621 commit e05186a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/flowgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,9 +1377,9 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
goto error;
}
if (!Py_IsNone(cnt)) {
Py_DECREF(cnt);
break;
}
Py_DECREF(cnt);
if (bb->b_iused <= i + 2) {
break;
}
Expand Down

0 comments on commit e05186a

Please sign in to comment.