Properly handle a NULL returned from PyArena_New().

(Also fix some whitespace)

Klocwork #364.
This commit is contained in:
Neal Norwitz 2006-09-11 04:28:16 +00:00
parent bcc119a22c
commit 2a399b0f11

View file

@ -797,6 +797,8 @@ parse_source_module(const char *pathname, FILE *fp)
PyCodeObject *co = NULL;
mod_ty mod;
PyArena *arena = PyArena_New();
if (arena == NULL)
return NULL;
mod = PyParser_ASTFromFile(fp, pathname, Py_file_input, 0, 0, 0,
NULL, arena);