Defer closing of xml file
This commit is contained in:
parent
d7ddae7b46
commit
97f671ee5e
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user