Commit 3f95bdcd authored by Christian Heimes's avatar Christian Heimes

Add missing check of PyDict_SetItem()'s return value

CID 486659
parents b578735d 97cb67b9
......@@ -120,7 +120,10 @@ test_dict_inner(int count)
for (i = 0; i < count; i++) {
v = PyLong_FromLong(i);
PyDict_SetItem(dict, v, v);
if (PyDict_SetItem(dict, v, v) < 0) {
Py_DECREF(v);
return -1;
}
Py_DECREF(v);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment