Close request body

This commit is contained in:
Neil Alexander 2022-03-28 09:52:34 +01:00
parent 9d25b2928a
commit c5413b9f4d
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -525,6 +525,7 @@ func Register(
userAPI userapi.UserRegisterAPI,
cfg *config.ClientAPI,
) util.JSONResponse {
defer req.Body.Close() // nolint: errcheck
reqBody, err := ioutil.ReadAll(req.Body)
if err != nil {
return util.JSONResponse{