Ensure that we are closing files.

This commit is contained in:
Piotr Skamruk
2016-09-06 09:58:22 +02:00
parent ff1cec99cc
commit dc3674c8d0
5 changed files with 6 additions and 0 deletions

View File

@@ -1528,6 +1528,7 @@ func readBytesFromFile(filename string) []byte {
framework.Failf(err.Error())
}
defer file.Close()
data, err := ioutil.ReadAll(file)
if err != nil {
framework.Failf(err.Error())