aboutsummaryrefslogtreecommitdiff
path: root/clientapi
diff options
context:
space:
mode:
authorguoguangwu <guoguangwu@magic-shield.com>2024-08-04 03:20:43 +0800
committerGitHub <noreply@github.com>2024-08-03 21:20:43 +0200
commit5216e74b9ade31e861d3f18a7a1b0e82ee0db5f6 (patch)
tree232fdeb72ca35153618019934fee538937d57f8c /clientapi
parent4d116ff0dbb3972228f798851fdf63d01cd3a3e9 (diff)
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>
Diffstat (limited to 'clientapi')
-rw-r--r--clientapi/threepid/threepid.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/clientapi/threepid/threepid.go b/clientapi/threepid/threepid.go
index d61052cc..5a57ef9c 100644
--- a/clientapi/threepid/threepid.go
+++ b/clientapi/threepid/threepid.go
@@ -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 {