Skip to content

Commit e05186a

Browse files
committed
Fix refleak when peepholing branches on None
1 parent 5890621 commit e05186a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/flowgraph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,9 +1377,9 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
13771377
goto error;
13781378
}
13791379
if (!Py_IsNone(cnt)) {
1380+
Py_DECREF(cnt);
13801381
break;
13811382
}
1382-
Py_DECREF(cnt);
13831383
if (bb->b_iused <= i + 2) {
13841384
break;
13851385
}

0 commit comments

Comments
 (0)