diff options
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index ead3f1bed3..2da70decff 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -502,7 +502,7 @@ type CreateCommentOptions struct { // CreateComment creates comment of issue or commit. func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error) { sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return nil, err } @@ -620,7 +620,7 @@ func UpdateComment(c *Comment) error { // DeleteComment deletes the comment func DeleteComment(comment *Comment) error { sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err := sess.Begin(); err != nil { return err } |