]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-153252: Fix error handling in `_PyCompile_CodeGen` (#153253)
authorsobolevn <mail@sobolevn.me>
Tue, 7 Jul 2026 16:41:05 +0000 (19:41 +0300)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2026 16:41:05 +0000 (16:41 +0000)
Python/compile.c

index f2c1de5e0c07c6378facd2982efa49ac77d97be3..fefb2b04b78db8674347e436e541ccbf90c9dc76 100644 (file)
@@ -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) {