mirror of
https://github.com/moby/moby.git
synced 2025-11-09 13:41:11 +03:00
add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user