Close pubkey file after reading
This commit is contained in:
parent
87fcda5fbc
commit
b4bf8cda8d
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue