summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 287bc2b..627184d 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -2027,8 +2027,10 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
}
if (!symtable_visit_annotations(st, s, s->v.AsyncFunctionDef.args,
- s->v.AsyncFunctionDef.returns, new_ste))
+ s->v.AsyncFunctionDef.returns, new_ste)) {
+ Py_DECREF(new_ste);
VISIT_QUIT(st, 0);
+ }
if (!symtable_enter_existing_block(st, new_ste)) {
Py_DECREF(new_ste);
VISIT_QUIT(st, 0);