summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go
index 8d8afdfdb8..6484c8cf69 100644
--- a/models/user.go
+++ b/models/user.go
@@ -436,7 +436,7 @@ func (u *User) UploadAvatar(data []byte) error {
m := resize.Resize(avatar.AvatarSize, avatar.AvatarSize, img, resize.NearestNeighbor)
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}
@@ -715,7 +715,7 @@ func CreateUser(u *User) (err error) {
u.MaxRepoCreation = -1
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}
@@ -1033,7 +1033,7 @@ func deleteUser(e *xorm.Session, u *User) error {
// but issues/comments/pulls will be kept and shown as someone has been deleted.
func DeleteUser(u *User) (err error) {
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}