From 21c1469999d33992fcaf2ea1d17bdcbeb8e38aac Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 9 Sep 2013 11:14:26 +0900 Subject: [PATCH] Must not close statement --- sqlite3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlite3.go b/sqlite3.go index 1a93298..daa3220 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -145,8 +145,8 @@ func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, err na := s.NumInput() res, err := s.Exec(args[:na]) args = args[na:] - s.Close() if err != nil { + s.Close() return nil, err } if s.t == "" { @@ -168,8 +168,8 @@ func (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, erro na := s.NumInput() rows, err := s.Query(args[:na]) args = args[na:] - s.Close() if err != nil { + s.Close() return nil, err } if s.t == "" {