Merge pull request #14514 from hqhq/hq_fix_file_leak
Fix file leak in integration-cli
This commit is contained in:
commit
6e64e0548f
1 changed files with 1 additions and 0 deletions
|
@ -1093,6 +1093,7 @@ func writeFile(dst, content string, c *check.C) {
|
|||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
// Write content (truncate if it exists)
|
||||
if _, err := io.Copy(f, strings.NewReader(content)); err != nil {
|
||||
c.Fatal(err)
|
||||
|
|
Loading…
Reference in a new issue