Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite4ba71f

Browse files
authored
GH-106008: Fix refleak when peepholingNone comparisons (#106367)
1 parentc9ce983 commite4ba71f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix possible reference leaks when failing to optimize comparisons with
2+
:const:`None` in the bytecode compiler.

‎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
gotoerror;
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)

[8]ページ先頭

©2009-2025 Movatter.jp