Skip to content

Commit

Permalink
Close pubkey file after reading
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Feb 17, 2021
1 parent 87fcda5 commit b4bf8cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/auth/shared/ssh_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func sshKeyUpload(httpClient *http.Client, hostname, keyFile string) error {
if err != nil {
return err
}
defer f.Close()
keyBytes, err := ioutil.ReadAll(f)
if err != nil {
return err
Expand Down

0 comments on commit b4bf8cd

Please sign in to comment.