k3s/cmd/kubeadm
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
..
app Merge pull request #60581 from lioncruise/patch-7 2018-03-20 02:37:23 -07:00
test Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
BUILD Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
OWNERS Remove mikedanese from kubeadm owners since he's no longer 2018-01-05 14:46:14 -08:00
kubeadm.go Add fmt.printf for other need 2017-08-18 16:07:56 +08:00