Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()

CID 486647
This commit is contained in:
Christian Heimes 2013-07-20 14:48:21 +02:00
commit 895bdfb16e
1 changed files with 3 additions and 1 deletions

View File

@ -3461,7 +3461,9 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
keyword);
goto fail;
}
PyDict_SetItem(kwdict, keyword, value);
if (PyDict_SetItem(kwdict, keyword, value) == -1) {
goto fail;
}
continue;
kw_found:
if (GETLOCAL(j) != NULL) {