summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-04-16 03:37:19 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-04-16 03:37:19 (GMT)
commit195e4e67e718635bd6107b3730e96d3c6f6c7f64 (patch)
tree1e5243c980b732e824bbac5b2c6f9f585c28a6c3 /Modules
parent5b03065087ad398e368eb5d2bc828d8a5862c804 (diff)
downloadcpython-195e4e67e718635bd6107b3730e96d3c6f6c7f64.zip
cpython-195e4e67e718635bd6107b3730e96d3c6f6c7f64.tar.gz
cpython-195e4e67e718635bd6107b3730e96d3c6f6c7f64.tar.bz2
Fix valgrind problem with invalid memory read
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_sqlite/statement.c3
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;
}