Skip to content

Commit bb21f6d

Browse files
authored
Fix readiness check HTTP body leak (#1005)
1 parent 748b879 commit bb21f6d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pkg/gitlab/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func (c *Client) ReadinessCheck(ctx context.Context) healthcheck.Check {
125125
if resp == nil {
126126
return fmt.Errorf("HTTP error: empty response")
127127
}
128+
defer resp.Body.Close()
128129

129130
if err == nil && resp.StatusCode != http.StatusOK {
130131
return fmt.Errorf("HTTP error: %d", resp.StatusCode)

0 commit comments

Comments
 (0)