diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:50:36 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:50:36 (GMT) |
commit | 18b6adf9b2f581da04cf5cd6149b84408763ea6e (patch) | |
tree | 3c24c102d355d84304002dc67a7ecfef37c6a597 /Python/future.c | |
parent | c6bacd5606cbf3f76ae7e116e425a61d291c68fc (diff) | |
download | cpython-18b6adf9b2f581da04cf5cd6149b84408763ea6e.zip cpython-18b6adf9b2f581da04cf5cd6149b84408763ea6e.tar.gz cpython-18b6adf9b2f581da04cf5cd6149b84408763ea6e.tar.bz2 |
Handle more mem alloc issues found with failmalloc
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c index 560077d..3b3ca1d 100644 --- a/Python/future.c +++ b/Python/future.c @@ -121,8 +121,10 @@ PyFuture_FromAST(mod_ty mod, const char *filename) PyFutureFeatures *ff; ff = (PyFutureFeatures *)PyObject_Malloc(sizeof(PyFutureFeatures)); - if (ff == NULL) + if (ff == NULL) { + PyErr_NoMemory(); return NULL; + } ff->ff_features = 0; ff->ff_lineno = -1; |