summaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index 38b172d2ed..947b2dabfd 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -430,7 +430,7 @@ func AddPublicKey(ownerID int64, name, content string) (*PublicKey, error) {
}
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return nil, err
}
@@ -535,7 +535,7 @@ func DeletePublicKey(doer *User, id int64) (err error) {
}
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}
@@ -732,7 +732,7 @@ func AddDeployKey(repoID int64, name, content string) (*DeployKey, error) {
}
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return nil, err
}
@@ -812,7 +812,7 @@ func DeleteDeployKey(doer *User, id int64) error {
}
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}