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 {