[Python-checkins] r52115 - python/branches/release24-maint/Python/future.c

andrew.kuchling python-checkins at python.org
Tue Oct 3 21:18:33 CEST 2006


Author: andrew.kuchling
Date: Tue Oct  3 21:18:33 2006
New Revision: 52115

Modified:
   python/branches/release24-maint/Python/future.c
Log:
[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]



Modified: python/branches/release24-maint/Python/future.c
==============================================================================
--- python/branches/release24-maint/Python/future.c	(original)
+++ python/branches/release24-maint/Python/future.c	Tue Oct  3 21:18:33 2006
@@ -246,8 +246,10 @@
 	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;


More information about the Python-checkins mailing list