Must not close statement

This commit is contained in:
mattn 2013-09-09 11:14:26 +09:00
parent 3f20cb1697
commit 21c1469999
1 changed files with 2 additions and 2 deletions

View File

@ -145,8 +145,8 @@ func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, err
na := s.NumInput() na := s.NumInput()
res, err := s.Exec(args[:na]) res, err := s.Exec(args[:na])
args = args[na:] args = args[na:]
s.Close()
if err != nil { if err != nil {
s.Close()
return nil, err return nil, err
} }
if s.t == "" { if s.t == "" {
@ -168,8 +168,8 @@ func (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, erro
na := s.NumInput() na := s.NumInput()
rows, err := s.Query(args[:na]) rows, err := s.Query(args[:na])
args = args[na:] args = args[na:]
s.Close()
if err != nil { if err != nil {
s.Close()
return nil, err return nil, err
} }
if s.t == "" { if s.t == "" {