summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-05-27 17:14:56 (GMT)
committerGitHub <noreply@github.com>2025-05-27 17:14:56 (GMT)
commitc6af7f4bf7edc9924efbaa7352c4eb636258d072 (patch)
tree83a441ef95f52998f0548caee352b5725ad8923a /Python
parentd6e478693779cf07d0b9d1177db2052daa962983 (diff)
downloadcpython-c6af7f4bf7edc9924efbaa7352c4eb636258d072.zip
cpython-c6af7f4bf7edc9924efbaa7352c4eb636258d072.tar.gz
cpython-c6af7f4bf7edc9924efbaa7352c4eb636258d072.tar.bz2
[3.13] GH-128161: Fix refleak introduced in GH-134788 (GH-134799)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index dba1023..e9506d6 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -5811,7 +5811,9 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type,
outermost = (comprehension_ty) asdl_seq_GET(generators, 0);
if (is_inlined) {
- VISIT(c, expr, outermost->iter);
+ if (compiler_visit_expr(c, outermost->iter) < 0) {
+ goto error;
+ }
if (push_inlined_comprehension_state(c, loc, entry, &inline_state)) {
goto error;
}