From 2fccbe5896746e94d1cdb98c23c07a7ead998d07 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 27 May 2025 17:30:26 +0100 Subject: [PATCH] Fix refleak introduced in GH-134788 --- Python/compile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index dba10237a2a735..e9506d6d978d89 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; }