diff --git a/clientapi/threepid/threepid.go b/clientapi/threepid/threepid.go index d61052cc0..5a57ef9c3 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 {