From bf62fcdfdf85ecc3a4673e020de143760ede09cc Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 7 Jul 2026 11:48:48 +0300 Subject: [PATCH] gh-153252: Fix error handling in `_PyCompile_CodeGen` --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index f2c1de5e0c07c6..fefb2b04b78db8 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1689,7 +1689,7 @@ _PyCompile_CodeGen(PyObject *ast, PyObject *filename, PyCompilerFlags *pflags, metadata = PyDict_New(); if (metadata == NULL) { - return NULL; + goto finally; } if (compiler_codegen(c, mod) < 0) {