aboutsummaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/pull.go')
-rw-r--r--models/pull.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/pull.go b/models/pull.go
index b5b63bebf1..882ee1b220 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -406,7 +406,7 @@ func (pr *PullRequest) setMerged() (err error) {
pr.HasMerged = true
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}
@@ -602,7 +602,7 @@ func (pr *PullRequest) testPatch() (err error) {
// NewPullRequest creates new pull request with labels for repository.
func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []string, pr *PullRequest, patch []byte) (err error) {
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}