summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-01-07 03:23:57 +0800
committerGitHub <noreply@github.com>2021-01-06 19:23:57 +0000
commit3c96a3716288b0ae1ae65df44cc92218b489b77f (patch)
tree014f698c969dfaad3602681e07140f75263889a9 /models
parent8688c2be95f1d11fadd6cbb979eafe0bb817589a (diff)
downloadgitea-3c96a3716288b0ae1ae65df44cc92218b489b77f.tar.gz
gitea-3c96a3716288b0ae1ae65df44cc92218b489b77f.zip
Some code improvements (#14266)
Diffstat (limited to 'models')
-rw-r--r--models/migrations/v156.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/migrations/v156.go b/models/migrations/v156.go
index af37e67d82..976d1a2d1b 100644
--- a/models/migrations/v156.go
+++ b/models/migrations/v156.go
@@ -137,6 +137,9 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error {
return err
}
}
+ if gitRepo != nil {
+ gitRepo.Close()
+ }
if err := sess.Commit(); err != nil {
return err