diff options
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 3b0e59a6d1..66a74cbdef 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -831,11 +831,7 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename, if (arena == NULL) goto error; mod = PyAST_obj2mod(source, arena, compile_mode); - if (mod == NULL) { - _PyArena_Free(arena); - goto error; - } - if (!_PyAST_Validate(mod)) { + if (mod == NULL || !_PyAST_Validate(mod)) { _PyArena_Free(arena); goto error; } |