Bug fix: `Rows` must be closed after used (#2214)

Issue: [#2213](https://gitea.com/xorm/xorm/issues/2213#issue-132724)
Co-authored-by: datbeohbbh <phongtomfapp@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2214
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: datbeohbbh <datbeohbbh@noreply.gitea.io>
Co-committed-by: datbeohbbh <datbeohbbh@noreply.gitea.io>
This commit is contained in:
datbeohbbh 2023-02-03 17:24:16 +08:00 committed by Lunny Xiao
parent 5fafa00043
commit 7dc2a18876
1 changed files with 3 additions and 0 deletions

View File

@ -815,6 +815,9 @@ func (engine *Engine) dumpTables(ctx context.Context, tables []*schemas.Table, w
return err
}
}
// !datbeohbbh! if no error, manually close
rows.Close()
sess.Close()
}
return nil
}