diff Python/future.c @ 39139:75a7106662a3 legacy-trunk

Handle more mem alloc issues found with failmalloc
author Neal Norwitz <nnorwitz@gmail.com>
date Sun, 23 Jul 2006 07:50:36 +0000
parents f448d0075691
children f3c1f9c8ce9f
line wrap: on
line diff
--- a/Python/future.c	Sun Jul 23 04:19:49 2006 +0000
+++ b/Python/future.c	Sun Jul 23 07:50:36 2006 +0000
@@ -121,8 +121,10 @@
 	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;