Not freeing rows objects.
This commit is contained in:
parent
75e28d3f5b
commit
81433cfaf4
2 changed files with 3 additions and 1 deletions
|
@ -138,8 +138,8 @@ func (p *PostgresDriver) Columns(tableName string) ([]bdb.Column, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer rows.Close()
|
||||
|
||||
for rows.Next() {
|
||||
var colName, colType, colDefault, nullable string
|
||||
var unique bool
|
||||
|
@ -195,6 +195,7 @@ func (p *PostgresDriver) PrimaryKeyInfo(tableName string) (*bdb.PrimaryKey, erro
|
|||
if rows, err = p.dbConn.Query(queryColumns, pkey.Name); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var columns []string
|
||||
for rows.Next() {
|
||||
|
|
|
@ -91,6 +91,7 @@ func bind(q *Query, obj interface{}, structType, sliceType reflect.Type, singula
|
|||
if err != nil {
|
||||
return errors.Wrap(err, "bind failed to execute query")
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
cols, err := rows.Columns()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue