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:10 +02:00
parent 14f5ee0a62
commit 0bd447f847
1 changed files with 3 additions and 1 deletions

View File

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