aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorJohn Gallagher <johnkgallagher@gmail.com>2012-10-15 20:57:32 -0400
committerJohn Gallagher <johnkgallagher@gmail.com>2012-10-15 20:57:32 -0400
commita76fd8f3365ce979f6f93893e2fb83af41c1a37e (patch)
treebd41c1b73a4e7f45b3174d74c267e508977169f6 /sqlite3.go
parent'is' does not work in some older sqlite3. (diff)
downloadgolite-a76fd8f3365ce979f6f93893e2fb83af41c1a37e.tar.gz
golite-a76fd8f3365ce979f6f93893e2fb83af41c1a37e.tar.xz
Fix read of invalid (already freed) memory.
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 980cc7e..4dde469 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -108,7 +108,7 @@ func (c *SQLiteConn) Close() error {
s := C.sqlite3_next_stmt(c.db, nil)
for s != nil {
C.sqlite3_finalize(s)
- s = C.sqlite3_next_stmt(c.db, s)
+ s = C.sqlite3_next_stmt(c.db, nil)
}
rv := C.sqlite3_close(c.db)
if rv != C.SQLITE_OK {