Skip to content

Commit

Permalink
Merge pull request kubernetes#42041 from yu-song/close-file-handle
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Add f.close for the opend file
  • Loading branch information
Kubernetes Submit Queue authored Feb 24, 2017
2 parents 4c1b875 + 6b1cf1d commit 6edd079
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kubectl/cmd/util/cached_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (d *CachedDiscoveryClient) getCachedFile(filename string) ([]byte, error) {
if err != nil {
return nil, err
}
defer file.Close()

fileInfo, err := file.Stat()
if err != nil {
Expand Down

0 comments on commit 6edd079

Please sign in to comment.