summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-03-17 19:03:25 (GMT)
committerGeorg Brandl <georg@python.org>2006-03-17 19:03:25 (GMT)
commit5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa (patch)
tree26fd8d333d8b7fdde9e4b4bb2c39082d9a3d29d0 /Python/compile.c
parenta5a0704942fcd422f817c9b34e77a2346ddcf102 (diff)
downloadcpython-5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa.zip
cpython-5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa.tar.gz
cpython-5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa.tar.bz2
Fix some missing checks after PyTuple_New, PyList_New, PyDict_New
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index baf3989..1217c1e 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -319,7 +319,9 @@ static PyObject *
list2dict(PyObject *list)
{
Py_ssize_t i, n;
- PyObject *v, *k, *dict = PyDict_New();
+ PyObject *v, *k;
+ PyObject *dict = PyDict_New();
+ if (!dict) return NULL;
n = PyList_Size(list);
for (i = 0; i < n; i++) {