mirror of
https://github.com/python/cpython
synced 2024-09-15 22:26:46 +00:00
GH-106008: Fix refleak when peepholing None
comparisons (#106367)
This commit is contained in:
parent
c9ce983ae1
commit
e4ba71fe4b
|
@ -0,0 +1,2 @@
|
|||
Fix possible reference leaks when failing to optimize comparisons with
|
||||
:const:`None` in the bytecode compiler.
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue