mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
store: Close Rows in hasColumn.
Not closing the Rows will cause SQLite3 to lock the database and block all other clients.
This commit is contained in:
parent
bf4264ea7f
commit
4ca023cd4d
|
@ -16,6 +16,7 @@ func hasColumn(rows *sql.Rows, colname string) (bool, error) {
|
|||
dests[i] = new(interface{})
|
||||
}
|
||||
}
|
||||
defer rows.Close()
|
||||
for rows.Next() {
|
||||
rows.Scan(dests...)
|
||||
if name == colname {
|
||||
|
|
Loading…
Reference in New Issue
Block a user