https://github.com/python/cpython/commit/a74280e6696125acb7628facc577d0f975c4d69e
commit: a74280e6696125acb7628facc577d0f975c4d69e
branch: main
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2026-07-07T16:41:05Z
summary:

gh-153252: Fix error handling in `_PyCompile_CodeGen` (#153253)

files:
M Python/compile.c

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) {

_______________________________________________
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