diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-07-26 02:30:47 -0700 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-07-26 17:30:47 +0800 |
commit | 5f37944dff7f8e48b3c5ce27bd1b77907b71f092 (patch) | |
tree | 8fcea06dfa72e936f571223ee423a6daf570142e /models/issue.go | |
parent | 7e12aac61c8ffcfb122d299216a88590e2a63e9c (diff) | |
download | gitea-5f37944dff7f8e48b3c5ce27bd1b77907b71f092.tar.gz gitea-5f37944dff7f8e48b3c5ce27bd1b77907b71f092.zip |
Fix unclosed session bug (#2214)
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index e2772052f7..a83cfd6504 100644 --- a/models/issue.go +++ b/models/issue.go @@ -1097,8 +1097,8 @@ func Issues(opts *IssuesOptions) ([]*Issue, error) { sess = x.Limit(setting.UI.IssuePagingNum, start) } else { sess = x.NewSession() - defer sess.Close() } + defer sess.Close() if len(opts.IssueIDs) > 0 { sess.In("issue.id", opts.IssueIDs) |