*: fix response body leaks
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
98910db2c0
commit
a4b96d76f7
1 changed files with 1 additions and 0 deletions
|
@ -101,6 +101,7 @@ func (c *Client) SendFile(serviceMethod string, data io.Reader, ret interface{})
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer body.Close()
|
||||
if err := json.NewDecoder(body).Decode(&ret); err != nil {
|
||||
logrus.Errorf("%s: error reading plugin resp: %v", serviceMethod, err)
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue