kubernetes/cmd/kubeadm/app/cmd
Kubernetes Submit Queue 25f58f9cee
Merge pull request #60581 from lioncruise/patch-7
Automatic merge from submit-queue (batch tested with PRs 60363, 59208, 59465, 60581, 60702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix: remove keyword defer in the loop to avoid resource leaks

Appearance of defer keyword inside a loop structure may caused resource leaks, it's not recommended to do it although it is in an unit test. Releasing a resource just after finishing using it is the most safe and effective solution, so remove defer is just OK.



**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-20 02:37:23 -07:00
..
phases Generate client certificates for healthchecking kubeadm etcd static pods 2018-03-04 19:25:16 -07:00
upgrade Bump to etcd 3.1.12 to pick up critical fix 2018-03-09 14:28:23 -08:00
util Merge pull request #60022 from fabriziopandini/kubeadm567 2018-02-21 18:09:40 -08:00
BUILD autogenerated files 2018-02-25 11:01:40 +01:00
cmd.go kubeadm-doc-preflight 2017-11-16 10:20:22 +01:00
completion.go fix kubectl_filedir completion 2018-03-13 16:21:30 -04:00
config.go Improve error messages and comments in KubeAdm. 2017-12-14 11:11:58 -08:00
init.go kubeadm create token using config file 2018-02-25 11:02:04 +01:00
join.go Add criSocket to kubeadm NodeConfiguration manifest 2018-02-13 09:16:23 -06:00
reset_test.go Fix: remove keyword defer in the loop 2018-02-28 21:48:27 +08:00
reset.go Remove bootstrap kubelet config on reset 2018-02-09 15:33:43 +02:00
token_test.go kubeadm create token using config file 2018-02-25 11:02:04 +01:00
token.go kubeadm create token using config file 2018-02-25 11:02:04 +01:00
version.go kubeadm/cmd: fix typos, punctuation and capitalization 2017-10-07 00:31:24 +03:00