diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-09 04:07:39 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-09 04:07:39 (GMT) |
commit | 4c842a4db0e696f20017555d8f7933b9ffb8a4b3 (patch) | |
tree | 0be7fbb524bde04317fe86c5fa6267378c615959 | |
parent | c5d0dbd328da9a193c055db96af6fb761617b7fe (diff) | |
download | cpython-4c842a4db0e696f20017555d8f7933b9ffb8a4b3.zip cpython-4c842a4db0e696f20017555d8f7933b9ffb8a4b3.tar.gz cpython-4c842a4db0e696f20017555d8f7933b9ffb8a4b3.tar.bz2 |
Fix problem (not checking return result) reported by Coverity
-rw-r--r-- | Modules/_sqlite/cursor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index b9ed56a..c6b8c77 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -455,6 +455,9 @@ PyObject* _query_execute(Cursor* self, int multiple, PyObject* args) Py_DECREF(second_argument); parameters_iter = PyObject_GetIter(parameters_list); + if (!parameters_iter) { + goto error; + } } if (self->statement != NULL) { @@ -670,7 +673,7 @@ PyObject* _query_execute(Cursor* self, int multiple, PyObject* args) error: Py_XDECREF(operation_bytestr); Py_XDECREF(parameters); - Py_DECREF(parameters_iter); + Py_XDECREF(parameters_iter); Py_XDECREF(parameters_list); if (PyErr_Occurred()) { |