[Python-checkins] r45451 - python/trunk/Modules/_sqlite/statement.c

neal.norwitz python-checkins at python.org
Sun Apr 16 05:37:19 CEST 2006


Author: neal.norwitz
Date: Sun Apr 16 05:37:19 2006
New Revision: 45451

Modified:
   python/trunk/Modules/_sqlite/statement.c
Log:
Fix valgrind problem with invalid memory read

Modified: python/trunk/Modules/_sqlite/statement.c
==============================================================================
--- python/trunk/Modules/_sqlite/statement.c	(original)
+++ python/trunk/Modules/_sqlite/statement.c	Sun Apr 16 05:37:19 2006
@@ -48,8 +48,6 @@
     char* sql_cstr;
 
     self->st = NULL;
-
-    self->st = NULL;
     self->in_use = 0;
 
     if (PyString_Check(sql)) {
@@ -80,6 +78,7 @@
 
     if (rc == SQLITE_OK && check_remaining_sql(tail)) {
         (void)sqlite3_finalize(self->st);
+        self->st = NULL;
         rc = PYSQLITE_TOO_MUCH_SQL;
     }
 


More information about the Python-checkins mailing list