From a2040255ca62d0250920fa744ac813e396ee0680 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 3 Oct 2006 19:18:33 +0000 Subject: [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] --- Python/future.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v0.12