mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
SF #1444030: Fix several potential defects found by Coverity.
(reviewed by Neal Norwitz)
This commit is contained in:
parent
ef1701f7d3
commit
4af5c8cee4
11 changed files with 53 additions and 17 deletions
|
@ -3477,8 +3477,11 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw)
|
|||
{
|
||||
PyObject *result;
|
||||
|
||||
if (arg == NULL)
|
||||
if (arg == NULL) {
|
||||
arg = PyTuple_New(0);
|
||||
if (arg == NULL)
|
||||
return NULL;
|
||||
}
|
||||
else if (!PyTuple_Check(arg)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"argument list must be a tuple");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue