mirror of
https://github.com/python/cpython.git
synced 2026-05-08 19:41:06 +00:00
[3.14] gh-149122: Fix refleak in codegen (GH-149179) (#149181)
gh-149122: Fix refleak in codegen (GH-149179)
(cherry picked from commit 4599335a83)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
ab2d84fe10
commit
bfcaeead9f
1 changed files with 2 additions and 0 deletions
|
|
@ -3864,8 +3864,10 @@ maybe_optimize_function_call(compiler *c, expr_ty e, jump_target_label end)
|
|||
expr_ty generator_exp = asdl_seq_GET(args, 0);
|
||||
PySTEntryObject *generator_entry = _PySymtable_Lookup(SYMTABLE(c), (void *)generator_exp);
|
||||
if (generator_entry->ste_coroutine) {
|
||||
Py_DECREF(generator_entry);
|
||||
return 0;
|
||||
}
|
||||
Py_DECREF(generator_entry);
|
||||
|
||||
location loc = LOC(func);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue