Commit dd4b299d authored by Victor Stinner's avatar Victor Stinner

Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, handle

_pysqlite_fetch_one_row() failure
parent 60798140
......@@ -891,6 +891,12 @@ PyObject* pysqlite_cursor_iternext(pysqlite_Cursor *self)
if (rc == SQLITE_ROW) {
self->next_row = _pysqlite_fetch_one_row(self);
if (self->next_row == NULL) {
(void)pysqlite_statement_reset(self->statement);
Py_DECREF(next_row);
_pysqlite_seterror(self->connection->db, NULL);
return NULL;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment