0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-06-01 03:59:03 +02:00

fix: close resp body

This commit is contained in:
guangwu 2024-04-19 16:44:38 +08:00 committed by GitHub
parent 14a6c10097
commit 3f4106417b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {