Skip to content

Commit

Permalink
aws - target - rds - mysql Added close() to registerRDSMysqlCerts req…
Browse files Browse the repository at this point in the history
…uest
  • Loading branch information
eitam-ring committed Aug 25, 2020
1 parent c016ba9 commit 37459cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions targets/aws/rds/mysql/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,13 @@ func registerRDSMysqlCerts(c *http.Client) error {
if err != nil {
return err
}

pem, err := ioutil.ReadAll(resp.Body)
if err != nil {
return err
}

defer func() {
_ = resp.Body.Close()
}()
rootCertPool := x509.NewCertPool()
if ok := rootCertPool.AppendCertsFromPEM(pem); !ok {
return err
Expand Down

0 comments on commit 37459cc

Please sign in to comment.