aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/docker/docker/client/network_create.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/docker/docker/client/network_create.go')
-rw-r--r--vendor/github.com/docker/docker/client/network_create.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/docker/docker/client/network_create.go b/vendor/github.com/docker/docker/client/network_create.go
index 41da2ac61..278d9383a 100644
--- a/vendor/github.com/docker/docker/client/network_create.go
+++ b/vendor/github.com/docker/docker/client/network_create.go
@@ -15,11 +15,11 @@ func (cli *Client) NetworkCreate(ctx context.Context, name string, options types
}
var response types.NetworkCreateResponse
serverResp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil)
+ defer ensureReaderClosed(serverResp)
if err != nil {
return response, err
}
- json.NewDecoder(serverResp.body).Decode(&response)
- ensureReaderClosed(serverResp)
+ err = json.NewDecoder(serverResp.body).Decode(&response)
return response, err
}