mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Close resp body on plugin call error
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 93ad9c31fc
)
This commit is contained in:
parent
3772dad6e9
commit
ba797dd6a2
1 changed files with 1 additions and 0 deletions
|
@ -122,6 +122,7 @@ func (c *Client) callWithRetry(serviceMethod string, data io.Reader, retry bool)
|
|||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
resp.Body.Close()
|
||||
if err != nil {
|
||||
return nil, &statusError{resp.StatusCode, serviceMethod, err.Error()}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue