aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/private.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-05-05 22:13:23 +0800
committerGitHub <noreply@github.com>2022-05-05 16:13:23 +0200
commit04fc4b7e05bfbfee6cb7aa4f6c30d1af6f2d4d2d (patch)
treef587d103068be565bd3d61e19f113f255f713763 /modules/context/private.go
parent7b089c465d9f851454be91ca209ab26782648a45 (diff)
downloadgitea-04fc4b7e05bfbfee6cb7aa4f6c30d1af6f2d4d2d.tar.gz
gitea-04fc4b7e05bfbfee6cb7aa4f6c30d1af6f2d4d2d.zip
Call MultipartForm.RemoveAll when request finishes (#19606)
Diffstat (limited to 'modules/context/private.go')
-rw-r--r--modules/context/private.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/context/private.go b/modules/context/private.go
index b57ba102e6..fdc7751227 100644
--- a/modules/context/private.go
+++ b/modules/context/private.go
@@ -66,6 +66,8 @@ func PrivateContexter() func(http.Handler) http.Handler {
Data: map[string]interface{}{},
},
}
+ defer ctx.Close()
+
ctx.Req = WithPrivateContext(req, ctx)
ctx.Data["Context"] = ctx
next.ServeHTTP(ctx.Resp, ctx.Req)