diff options
| author | Andrew M. Kuchling <amk@amk.ca> | 2006-10-03 19:18:33 (GMT) |
|---|---|---|
| committer | Andrew M. Kuchling <amk@amk.ca> | 2006-10-03 19:18:33 (GMT) |
| commit | a2040255ca62d0250920fa744ac813e396ee0680 (patch) | |
| tree | 00ba5ead9e4e7cc6bc40f1b44a17e770fa112590 /Python | |
| parent | 58e5c1149a94bed13a0b7a1b5b2b817f0f365f81 (diff) | |
| download | cpython-a2040255ca62d0250920fa744ac813e396ee0680.zip cpython-a2040255ca62d0250920fa744ac813e396ee0680.tar.gz cpython-a2040255ca62d0250920fa744ac813e396ee0680.tar.bz2 | |
[Partial backport of r50777 | neal.norwitz]
Handle more mem alloc issues found with failmalloc
[The other half of this patch affected Python/symtable.c, and wasn't
relevant for the 2.4 branch. --amk]
Diffstat (limited to 'Python')
| -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 20d8dd2..38edc87 100644 --- a/Python/future.c +++ b/Python/future.c @@ -246,8 +246,10 @@ PyNode_Future(node *n, const char *filename) PyFutureFeatures *ff; ff = (PyFutureFeatures *)PyMem_Malloc(sizeof(PyFutureFeatures)); - if (ff == NULL) + if (ff == NULL) { + PyErr_NoMemory(); return NULL; + } ff->ff_found_docstring = 0; ff->ff_last_lineno = -1; ff->ff_features = 0; |
