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:
Qi Xiao 2016-02-13 12:37:31 +01:00
parent bf4264ea7f
commit 4ca023cd4d

View File

@ -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 {