summaryrefslogtreecommitdiffstats
path: root/models/attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/attachment.go')
-rw-r--r--models/attachment.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/attachment.go b/models/attachment.go
index d800a47109..3b3521bf60 100644
--- a/models/attachment.go
+++ b/models/attachment.go
@@ -48,7 +48,7 @@ func (a *Attachment) AfterSet(colName string, _ xorm.Cell) {
// IncreaseDownloadCount is update download count + 1
func (a *Attachment) IncreaseDownloadCount() error {
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
// Update download count.
if _, err := sess.Exec("UPDATE `attachment` SET download_count=download_count+1 WHERE id=?", a.ID); err != nil {