summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
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++) {