diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-02-28 11:54:54 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-02-28 11:54:54 -0500 |
commit | 7367e699d3c4c9a3c728c95e42b8ffcb7163f1ec (patch) | |
tree | a4939a6f4919c39081444a994ee86d69f5bcbd26 | |
parent | 03d273f61debf6fe68b8ddd461b5b96e1c32c764 (diff) |
Added defer on response body to close after HandleResponse finishes.
-rw-r--r-- | bridge.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -134,6 +134,7 @@ func (bridge *Bridge) Delete(path string) error { // and invalid return types. func HandleResponse(resp *http.Response) ([]byte, io.Reader, error) { body, err := ioutil.ReadAll(resp.Body) + defer resp.Body.Close() if err != nil { trace("Error parsing bridge description xml.", nil) return []byte{}, nil, err |