Skip to content

Commit

Permalink
Merge pull request #91 from testwill/close_body
Browse files Browse the repository at this point in the history
fix: close resp body
  • Loading branch information
natesales authored May 16, 2024
2 parents 13bcea1 + 4586379 commit 251f4a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions transport/odoh.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func (o *ODoH) Exchange(m *dns.Msg) (*dns.Msg, error) {
if err != nil {
return nil, fmt.Errorf("do target configs request: %s", err)
}
defer resp.Body.Close()

bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
Expand Down

0 comments on commit 251f4a8

Please sign in to comment.