summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorAlex Henrie <alexhenrie24@gmail.com>2021-03-02 03:20:25 -0700
committerGitHub <noreply@github.com>2021-03-02 10:20:25 +0000
commit503627fc2acb875b4c7b58a7f6e258cfcbad054b (patch)
tree1f55b7b9821ebf7a85666bcbf62bbb4e826bfae4 /Python/compile.c
parent25e244c92501e84b0fd6e7539e15c0e640d42cc1 (diff)
downloadcpython-git-503627fc2acb875b4c7b58a7f6e258cfcbad054b.tar.gz
bpo-43358: Fix bad free in assemble function (GH-24697)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 454005eb7b..b0d3127ff6 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -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;