1
0
Fork 0
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:
allencloud 2016-06-25 11:57:21 +08:00
parent 2684459ed4
commit 0ead624473
25 changed files with 93 additions and 26 deletions

View file

@ -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)