From a76fd8f3365ce979f6f93893e2fb83af41c1a37e Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Mon, 15 Oct 2012 20:57:32 -0400 Subject: [PATCH] Fix read of invalid (already freed) memory. --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {