https://github.com/python/cpython/commit/645f5c4a737b3eab29d0b7bcd4ec5f8bd36f332d
commit: 645f5c4a737b3eab29d0b7bcd4ec5f8bd36f332d
branch: main
author: Benedikt Johannes <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-02-14T19:20:33Z
summary:

gh-144822: remove redundant decref in `codegen.c` (#144823)

files:
M Python/codegen.c

diff --git a/Python/codegen.c b/Python/codegen.c
index 32a03e7212eeab..42fccb07d31dba 100644
--- a/Python/codegen.c
+++ b/Python/codegen.c
@@ -1422,7 +1422,6 @@ codegen_function_body(compiler *c, stmt_ty s, int 
is_async, Py_ssize_t funcflags
     PyCodeObject *co = _PyCompile_OptimizeAndAssemble(c, 1);
     _PyCompile_ExitScope(c);
     if (co == NULL) {
-        Py_XDECREF(co);
         return ERROR;
     }
     int ret = codegen_make_closure(c, LOC(s), co, funcflags);

_______________________________________________
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]

Reply via email to