aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index d8fea9d047d..5d06a8342d3 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2692,8 +2692,10 @@ compiler_lambda(struct compiler *c, expr_ty e)
qualname = c->u->u_qualname;
Py_INCREF(qualname);
compiler_exit_scope(c);
- if (co == NULL)
+ if (co == NULL) {
+ Py_DECREF(qualname);
return 0;
+ }
compiler_make_closure(c, co, funcflags, qualname);
Py_DECREF(qualname);