[Python-checkins] cpython: check return for error
benjamin.peterson
python-checkins at python.org
Fri Jun 1 20:18:29 CEST 2012
http://hg.python.org/cpython/rev/2285a82504dc
changeset: 77283:2285a82504dc
user: Benjamin Peterson <benjamin at python.org>
date: Fri Jun 01 11:18:22 2012 -0700
summary:
check return for error
files:
Python/ceval.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3107,6 +3107,8 @@
tail = PyUnicode_FromFormat(", %U, and %U",
PyList_GET_ITEM(names, len - 2),
PyList_GET_ITEM(names, len - 1));
+ if (tail == NULL)
+ return;
/* Chop off the last two objects in the list. This shouldn't actually
fail, but we can't be too careful. */
err = PyList_SetSlice(names, len - 2, len, NULL);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list