diff --git a/Python/compile.c b/Python/compile.c index c210c823157dd1..6c5ef5329ffc3a 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1641,7 +1641,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) {