Fix valgrind problem with invalid memory read
This commit is contained in:
parent
5b03065087
commit
195e4e67e7
|
@ -47,8 +47,6 @@ int statement_create(Statement* self, Connection* connection, PyObject* sql)
|
||||||
PyObject* sql_str;
|
PyObject* sql_str;
|
||||||
char* sql_cstr;
|
char* sql_cstr;
|
||||||
|
|
||||||
self->st = NULL;
|
|
||||||
|
|
||||||
self->st = NULL;
|
self->st = NULL;
|
||||||
self->in_use = 0;
|
self->in_use = 0;
|
||||||
|
|
||||||
|
@ -80,6 +78,7 @@ int statement_create(Statement* self, Connection* connection, PyObject* sql)
|
||||||
|
|
||||||
if (rc == SQLITE_OK && check_remaining_sql(tail)) {
|
if (rc == SQLITE_OK && check_remaining_sql(tail)) {
|
||||||
(void)sqlite3_finalize(self->st);
|
(void)sqlite3_finalize(self->st);
|
||||||
|
self->st = NULL;
|
||||||
rc = PYSQLITE_TOO_MUCH_SQL;
|
rc = PYSQLITE_TOO_MUCH_SQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue