fix: close the resp in time (#689)

This commit is contained in:
akkuman
2022-04-21 23:22:50 +08:00
committed by GitHub
parent 7464f9a8ad
commit 7b78e60265
3 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,7 @@ func (idp *DingTalkIdProvider) GetUserInfo(token *oauth2.Token) (*UserInfo, erro
if err != nil {
return nil, err
}
defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
if err != nil {