Defer closing of xml file

This commit is contained in:
inhies 2016-10-25 10:18:49 -06:00 committed by Huin
parent d7ddae7b46
commit 97f671ee5e

View File

@ -412,7 +412,7 @@ func unmarshalXmlFile(file *zip.File, data interface{}) error {
return err
}
decoder := xml.NewDecoder(r)
r.Close()
defer r.Close()
return decoder.Decode(data)
}