diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-16 03:37:19 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-16 03:37:19 (GMT) |
commit | 195e4e67e718635bd6107b3730e96d3c6f6c7f64 (patch) | |
tree | 1e5243c980b732e824bbac5b2c6f9f585c28a6c3 | |
parent | 5b03065087ad398e368eb5d2bc828d8a5862c804 (diff) | |
download | cpython-195e4e67e718635bd6107b3730e96d3c6f6c7f64.zip cpython-195e4e67e718635bd6107b3730e96d3c6f6c7f64.tar.gz cpython-195e4e67e718635bd6107b3730e96d3c6f6c7f64.tar.bz2 |
Fix valgrind problem with invalid memory read
-rw-r--r-- | Modules/_sqlite/statement.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index a8a9cf5..0c93651 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -48,8 +48,6 @@ int statement_create(Statement* self, Connection* connection, PyObject* sql) char* sql_cstr; self->st = NULL; - - self->st = NULL; self->in_use = 0; if (PyString_Check(sql)) { @@ -80,6 +78,7 @@ int statement_create(Statement* self, Connection* connection, PyObject* sql) if (rc == SQLITE_OK && check_remaining_sql(tail)) { (void)sqlite3_finalize(self->st); + self->st = NULL; rc = PYSQLITE_TOO_MUCH_SQL; } |