diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-07 15:39:21 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-07 15:39:21 (GMT) |
commit | 4af5c8cee4885df70884a58e2e74c48984bbe7c2 (patch) | |
tree | f4c33e559962940576f84b61f760a1b27a3b8618 /Python/ceval.c | |
parent | ef1701f7d3a57427c1289bef32227a7aaac7905a (diff) | |
download | cpython-4af5c8cee4885df70884a58e2e74c48984bbe7c2.zip cpython-4af5c8cee4885df70884a58e2e74c48984bbe7c2.tar.gz cpython-4af5c8cee4885df70884a58e2e74c48984bbe7c2.tar.bz2 |
SF #1444030: Fix several potential defects found by Coverity.
(reviewed by Neal Norwitz)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 5fda826..b069c77 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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"); |