fix: ensure response body is closed

This commit is contained in:
Dominic Evans
2021-05-13 10:18:56 +01:00
parent 8085c2d3ca
commit cfb8bf7513

View File

@@ -69,6 +69,7 @@ func (c HG612Client) DSLStatus() (*VDSLStatus, error) {
if err != nil {
return nil, errors.Wrap(err, "error executing dsl status request")
}
defer resp.Body.Close()
all, err := ioutil.ReadAll(resp.Body)
if err != nil {