mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
Fix a reference leak in the compiler for compiler_lambda() (GH-24382)
This commit is contained in:
parent
0837f99d33
commit
7fdab8331b
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue