Merge pull request #469 from zaddok/patch-1

Fix potential memory leak
formula
xuri 6 years ago committed by GitHub
commit 23c8d1ec8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,10 +109,12 @@ func (f *File) WriteToBuffer() (*bytes.Buffer, error) {
for path, content := range f.XLSX {
fi, err := zw.Create(path)
if err != nil {
zw.Close()
return buf, err
}
_, err = fi.Write(content)
if err != nil {
zw.Close()
return buf, err
}
}

Loading…
Cancel
Save