From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 7 Jul 2026 17:27:32 +0000 (+0200) Subject: [3.15] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153281) X-Git-Tag: v3.15.0b4~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c30c8a4a65a9d5b0cf711dd761451a3a5128f927;p=thirdparty%2FPython%2Fcpython.git [3.15] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153281) gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (cherry picked from commit a74280e6696125acb7628facc577d0f975c4d69e) Co-authored-by: sobolevn --- diff --git a/Python/compile.c b/Python/compile.c index f2c1de5e0c07..fefb2b04b78d 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) {