]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-144822: remove redundant decref in `codegen.c` (#144823)
authorBenedikt Johannes <benedikt.johannes.hofer@gmail.com>
Sat, 14 Feb 2026 19:20:33 +0000 (20:20 +0100)
committerGitHub <noreply@github.com>
Sat, 14 Feb 2026 19:20:33 +0000 (19:20 +0000)
Python/codegen.c

index 32a03e7212eeab4ad3f1c73d17bbfd8eb240b458..42fccb07d31dbaeda69eb6fdeafeb17e0ce4fcb0 100644 (file)
@@ -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);