tealeg / xlsx

Go library for reading and writing XLSX files.
Other
5.81k stars 810 forks source link

Resource leakage in the lib.go file #747

Closed zhangyue9999 closed 1 year ago

zhangyue9999 commented 2 years ago

1、rc, err := worksheetRelsFile.Open() in the makeHyperlinkTable function does not close the RC handle. As a result, resource leakage occurs. 2、In the readSheetsFromZipFile function, rc, err = f.Open() does not close the rc handle, causing resource leakage. 3、In the readSharedStringsFromZipFile function, rc, err = f.Open() does not close the rc handle, causing resource leakage. 4、In the readStylesFromZipFile function, rc, err = f.Open() does not close the rc handle, causing resource leakage. 5、In the readThemeFromZipFile function, rc, err = f.Open() does not close the rc handle, causing resource leakage. 6、In the readWorkbookRelationsFromZipFile function, rc, err = workbookRels.Open() does not close the rc handle, causing resource leakage.

github-actions[bot] commented 1 year ago

Stale issue message

dolmen commented 1 year ago

@zhangyue9999 Thanks for this report. I'm working on a fix.