mirror of https://github.com/mattn/go-sqlite3.git
Must not close statement
This commit is contained in:
parent
3f20cb1697
commit
21c1469999
|
@ -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 == "" {
|
||||
|
|
Loading…
Reference in New Issue