]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43358: Fix bad free in assemble function (GH-24697)
authorAlex Henrie <alexhenrie24@gmail.com>
Tue, 2 Mar 2021 10:20:25 +0000 (03:20 -0700)
committerGitHub <noreply@github.com>
Tue, 2 Mar 2021 10:20:25 +0000 (10:20 +0000)
Python/compile.c

index 454005eb7b0cbe2c6e39af75f6ffda7cbc541caf..b0d3127ff6878feaba4859223dc78a6821b5a1a0 100644 (file)
@@ -6664,12 +6664,12 @@ assemble(struct compiler *c, int addNone)
 
     for (basicblock *b = c->u->u_blocks; b != NULL; b = b->b_list) {
         if (normalize_basic_block(b)) {
-            goto error;
+            return NULL;
         }
     }
 
     if (ensure_exits_have_lineno(c)) {
-        goto error;
+        return NULL;
     }
 
     nblocks = 0;