Skip to content

Commit

Permalink
Merge pull request #202 from bvwells/close
Browse files Browse the repository at this point in the history
Ensure response body is closed in DownloadAccessToken
  • Loading branch information
openshift-merge-robot authored Feb 3, 2021
2 parents cd6d75b + 852eff2 commit e57c573
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions example/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func DownloadAccessToken(url string, auth *osin.BasicAuth, output map[string]int
if err != nil {
return err
}
defer presp.Body.Close()

if presp.StatusCode != 200 {
return errors.New("Invalid status code")
Expand Down

0 comments on commit e57c573

Please sign in to comment.