mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Fix problem (not checking return result) reported by Coverity
This commit is contained in:
parent
c5d0dbd328
commit
4c842a4db0
1 changed files with 4 additions and 1 deletions
|
|
@ -455,6 +455,9 @@ PyObject* _query_execute(Cursor* self, int multiple, PyObject* args)
|
||||||
Py_DECREF(second_argument);
|
Py_DECREF(second_argument);
|
||||||
|
|
||||||
parameters_iter = PyObject_GetIter(parameters_list);
|
parameters_iter = PyObject_GetIter(parameters_list);
|
||||||
|
if (!parameters_iter) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->statement != NULL) {
|
if (self->statement != NULL) {
|
||||||
|
|
@ -670,7 +673,7 @@ PyObject* _query_execute(Cursor* self, int multiple, PyObject* args)
|
||||||
error:
|
error:
|
||||||
Py_XDECREF(operation_bytestr);
|
Py_XDECREF(operation_bytestr);
|
||||||
Py_XDECREF(parameters);
|
Py_XDECREF(parameters);
|
||||||
Py_DECREF(parameters_iter);
|
Py_XDECREF(parameters_iter);
|
||||||
Py_XDECREF(parameters_list);
|
Py_XDECREF(parameters_list);
|
||||||
|
|
||||||
if (PyErr_Occurred()) {
|
if (PyErr_Occurred()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue