]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] GH-128161: Fix refleak introduced in GH-134788 (GH-134799)
authorMark Shannon <mark@hotpy.org>
Tue, 27 May 2025 17:14:56 +0000 (18:14 +0100)
committerGitHub <noreply@github.com>
Tue, 27 May 2025 17:14:56 +0000 (18:14 +0100)
Python/compile.c

index dba10237a2a73524a45100950048ea2998789141..e9506d6d978d893fd804bf4be116882e86f72b0b 100644 (file)
@@ -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;
         }