{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60581","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60581/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60581/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60581/events","html_url":"https://github.com/kubernetes/kubernetes/pull/60581","id":301003192,"number":60581,"title":"Fix: remove keyword defer in the loop to avoid resource leaks","user":{"login":"lioncruise","id":12690984,"avatar_url":"https://avatars0.githubusercontent.com/u/12690984?v=4","gravatar_id":"","url":"https://api.github.com/users/lioncruise","html_url":"https://github.com/lioncruise","followers_url":"https://api.github.com/users/lioncruise/followers","following_url":"https://api.github.com/users/lioncruise/following{/other_user}","gists_url":"https://api.github.com/users/lioncruise/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncruise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncruise/subscriptions","organizations_url":"https://api.github.com/users/lioncruise/orgs","repos_url":"https://api.github.com/users/lioncruise/repos","events_url":"https://api.github.com/users/lioncruise/events{/privacy}","received_events_url":"https://api.github.com/users/lioncruise/received_events","type":"User","site_admin":false},"labels":[{"id":451459590,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/kubeadm","name":"area/kubeadm","color":"0052cc","default":false},{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":148225179,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lgtm","name":"lgtm","color":"15dd18","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":173494222,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cluster-lifecycle","name":"sig/cluster-lifecycle","color":"d2b48c","default":false},{"id":253450793,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XS","name":"size/XS","color":"009900","default":false}],"state":"open","locked":false,"assignee":{"login":"kad","id":41858,"avatar_url":"https://avatars1.githubusercontent.com/u/41858?v=4","gravatar_id":"","url":"https://api.github.com/users/kad","html_url":"https://github.com/kad","followers_url":"https://api.github.com/users/kad/followers","following_url":"https://api.github.com/users/kad/following{/other_user}","gists_url":"https://api.github.com/users/kad/gists{/gist_id}","starred_url":"https://api.github.com/users/kad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kad/subscriptions","organizations_url":"https://api.github.com/users/kad/orgs","repos_url":"https://api.github.com/users/kad/repos","events_url":"https://api.github.com/users/kad/events{/privacy}","received_events_url":"https://api.github.com/users/kad/received_events","type":"User","site_admin":false},"assignees":[{"login":"kad","id":41858,"avatar_url":"https://avatars1.githubusercontent.com/u/41858?v=4","gravatar_id":"","url":"https://api.github.com/users/kad","html_url":"https://github.com/kad","followers_url":"https://api.github.com/users/kad/followers","following_url":"https://api.github.com/users/kad/following{/other_user}","gists_url":"https://api.github.com/users/kad/gists{/gist_id}","starred_url":"https://api.github.com/users/kad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kad/subscriptions","organizations_url":"https://api.github.com/users/kad/orgs","repos_url":"https://api.github.com/users/kad/repos","events_url":"https://api.github.com/users/kad/events{/privacy}","received_events_url":"https://api.github.com/users/kad/received_events","type":"User","site_admin":false},{"login":"luxas","id":5442475,"avatar_url":"https://avatars1.githubusercontent.com/u/5442475?v=4","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-02-28T12:19:35Z","updated_at":"2018-03-10T08:24:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/60581","html_url":"https://github.com/kubernetes/kubernetes/pull/60581","diff_url":"https://github.com/kubernetes/kubernetes/pull/60581.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/60581.patch"},"body":"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.\r\n\r\n<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/devel/pull-requests.md#the-pr-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/devel/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/devel/pull-requests.md#write-release-notes-if-needed\r\n4. If the PR is unfinished, see how to mark it: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#marking-unfinished-pull-requests\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes #\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nNONE\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/372012859","html_url":"https://github.com/kubernetes/kubernetes/pull/60581#issuecomment-372012859","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60581","id":372012859,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars0.githubusercontent.com/u/13653959?v=4","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2018-03-10T08:24:43Z","updated_at":"2018-03-10T08:24:43Z","author_association":"COLLABORATOR","body":"/test all\n\nTests are more than 96 hours old. Re-running tests."}}
{"actor":{"display_login":"k8s-merge-robot"}}