close the open file

This commit is contained in:
guangxuli 2016-09-04 21:17:01 +08:00
parent 2ead4ba589
commit 294558be84

View File

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