소스 검색

Close resp body on plugin call error

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Brian Goff 9 년 전
부모
커밋
93ad9c31fc
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      pkg/plugins/client.go

+ 1 - 0
pkg/plugins/client.go

@@ -124,6 +124,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()}
 			}