mirror of https://github.com/mattn/go-sqlite3.git
Close rows if not nil
This commit is contained in:
parent
21c1469999
commit
9150577da1
|
@ -175,7 +175,9 @@ func (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, erro
|
|||
if s.t == "" {
|
||||
return rows, nil
|
||||
}
|
||||
rows.Close()
|
||||
if rows != nil {
|
||||
rows.Close()
|
||||
}
|
||||
s.Close()
|
||||
query = s.t
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue