mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-09 11:21:08 +01:00
fix: close resp body (#3364)
### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [ ] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [ ] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Your Name <your@email.example.org>` Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
4d116ff0db
commit
5216e74b9a
1 changed files with 1 additions and 0 deletions
|
@ -83,6 +83,7 @@ func CreateSession(
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// Error if the status isn't OK
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
|
|
Loading…
Reference in a new issue