https://github.com/python/cpython/commit/bfcaeead9fc9d19c499a671b0071ce5aa8c91e83 commit: bfcaeead9fc9d19c499a671b0071ce5aa8c91e83 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: kumaraditya303 <[email protected]> date: 2026-04-30T18:42:52+05:30 summary:
[3.14] gh-149122: Fix refleak in codegen (GH-149179) (#149181) gh-149122: Fix refleak in codegen (GH-149179) (cherry picked from commit 4599335a83a22cf73a0c20e3692c29fd0278d23b) Co-authored-by: Petr Viktorin <[email protected]> files: M Python/codegen.c diff --git a/Python/codegen.c b/Python/codegen.c index 3ce7220bcb6adf..766d54d069927e 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -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); _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
