diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2023-07-04 10:03:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 10:03:57 (GMT) |
commit | e4ba71fe4b32ae0d7fb3319d697616470fba1e58 (patch) | |
tree | 0610612b46d26fe62b30cc07d30c80cf6aa57224 /Python | |
parent | c9ce983ae1a361f431a0303aeb6f4b8e1d674275 (diff) | |
download | cpython-e4ba71fe4b32ae0d7fb3319d697616470fba1e58.zip cpython-e4ba71fe4b32ae0d7fb3319d697616470fba1e58.tar.gz cpython-e4ba71fe4b32ae0d7fb3319d697616470fba1e58.tar.bz2 |
GH-106008: Fix refleak when peepholing `None` comparisons (#106367)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/flowgraph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c index 213c993..e159a43 100644 --- a/Python/flowgraph.c +++ b/Python/flowgraph.c @@ -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; } |