Close rows if not nil

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

View File

@ -175,7 +175,9 @@ func (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, erro
if s.t == "" { if s.t == "" {
return rows, nil return rows, nil
} }
rows.Close() if rows != nil {
rows.Close()
}
s.Close() s.Close()
query = s.t query = s.t
} }