mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
2684459ed4
commit
0ead624473
25 changed files with 93 additions and 26 deletions
|
@ -35,6 +35,7 @@ func (s *DockerSuite) TestSaveAndLoadRepoStdout(c *check.C) {
|
|||
|
||||
tmpFile, err = os.Open(tmpFile.Name())
|
||||
c.Assert(err, check.IsNil)
|
||||
defer tmpFile.Close()
|
||||
|
||||
deleteImages(repoName)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue