aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridge.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/bridge.go b/bridge.go
index c5cad71..1d541da 100644
--- a/bridge.go
+++ b/bridge.go
@@ -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