comparison Python/future.c @ 39972:ef09e26ef099 2.4

[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]
author Andrew M. Kuchling <amk@amk.ca>
date Tue, 03 Oct 2006 19:18:33 +0000
parents f7474d31ba3f
children
comparison
equal deleted inserted replaced
39971:8c83fd79cee5 39972:ef09e26ef099
244 PyNode_Future(node *n, const char *filename) 244 PyNode_Future(node *n, const char *filename)
245 { 245 {
246 PyFutureFeatures *ff; 246 PyFutureFeatures *ff;
247 247
248 ff = (PyFutureFeatures *)PyMem_Malloc(sizeof(PyFutureFeatures)); 248 ff = (PyFutureFeatures *)PyMem_Malloc(sizeof(PyFutureFeatures));
249 if (ff == NULL) 249 if (ff == NULL) {
250 PyErr_NoMemory();
250 return NULL; 251 return NULL;
252 }
251 ff->ff_found_docstring = 0; 253 ff->ff_found_docstring = 0;
252 ff->ff_last_lineno = -1; 254 ff->ff_last_lineno = -1;
253 ff->ff_features = 0; 255 ff->ff_features = 0;
254 256
255 if (future_parse(ff, n, filename) < 0) { 257 if (future_parse(ff, n, filename) < 0) {