mirror of
https://github.com/python/cpython.git
synced 2026-05-06 04:37:33 -04: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:
committed by
GitHub
parent
ab2d84fe10
commit
bfcaeead9f
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user