Mercurial > cpython-lru_cache-weakref
diff Objects/structseq.c @ 39445:e11caad7e029 legacy-trunk
Klocwork made another run and found a bunch more problems.
This is the first batch of fixes that should be easy to verify based on context.
This fixes problem numbers: 220 (ast), 323-324 (symtable),
321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sat, 12 Aug 2006 01:43:40 +0000 |
| parents | 353fe06dab5b |
| children | 6620a510e9a9 |
line wrap: on
line diff
--- a/Objects/structseq.c Fri Aug 11 19:55:35 2006 +0000 +++ b/Objects/structseq.c Sat Aug 12 01:43:40 2006 +0000 @@ -215,6 +215,8 @@ PyObject *tup; int result; tup = make_tuple(obj); + if (!tup) + return -1; result = PySequence_Contains(tup, o); Py_DECREF(tup); return result; @@ -226,6 +228,8 @@ PyObject *tup; long result; tup = make_tuple((PyStructSequence*) obj); + if (!tup) + return -1; result = PyObject_Hash(tup); Py_DECREF(tup); return result;
