Skip to content

Commit

Permalink
Fix reference leak when encountering error during compilation of func…
Browse files Browse the repository at this point in the history
…tion body.
  • Loading branch information
markshannon committed Nov 13, 2020
1 parent 58136c7 commit 55d9d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/compile.c
Expand Up @@ -2276,7 +2276,7 @@ compiler_function(struct compiler *c, stmt_ty s, int is_async)
c->u->u_posonlyargcount = asdl_seq_LEN(args->posonlyargs);
c->u->u_kwonlyargcount = asdl_seq_LEN(args->kwonlyargs);
for (i = docstring ? 1 : 0; i < asdl_seq_LEN(body); i++) {
VISIT(c, stmt, (stmt_ty)asdl_seq_GET(body, i));
VISIT_IN_SCOPE(c, stmt, (stmt_ty)asdl_seq_GET(body, i));
}
co = assemble(c, 1);
qualname = c->u->u_qualname;
Expand Down

0 comments on commit 55d9d2b

Please sign in to comment.