Skip to content

Commit 3bb46a4

Browse files
committed
Fix memory leak and restore original comment
1 parent 002b033 commit 3bb46a4

File tree

3 files changed

+145
-143
lines changed

3 files changed

+145
-143
lines changed

Python/bytecodes.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2443,8 +2443,9 @@ dummy_func(
24432443
STAT_INC(FOR_ITER, hit);
24442444
if (r->len <= 0) {
24452445
STACK_SHRINK(1);
2446+
Py_DECREF(r);
24462447
SKIP_OVER(INLINE_CACHE_ENTRIES_FOR_ITER);
2447-
/* Jump forward oparg, then skip following END_FOR instruction */
2448+
// Jump over END_FOR instruction.
24482449
JUMPBY(oparg + 1);
24492450
DISPATCH();
24502451
}

Python/executor_cases.c.h

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)