From: sobolevn Date: Tue, 7 Jul 2026 16:41:05 +0000 (+0300) Subject: gh-153252: Fix error handling in `_PyCompile_CodeGen` (#153253) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a74280e6696125acb7628facc577d0f975c4d69e;p=thirdparty%2FPython%2Fcpython.git gh-153252: Fix error handling in `_PyCompile_CodeGen` (#153253) --- 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) {