Skip to content

Commit 4ce96c7

Browse files
committed
fix: close metadata file
1 parent 19c179e commit 4ce96c7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • pkg/fanal/analyzer/language/python/pip

pkg/fanal/analyzer/language/python/pip/pip.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ func (a pipLibraryAnalyzer) pkgLicense(pkgName, pkgVer, spDir string) []string {
113113
if metadataFile == nil {
114114
return nil
115115
}
116+
defer metadataFile.Close()
116117

117118
metadataPkg, _, err := a.metadataParser.Parse(metadataFile)
118119
if err != nil {

0 commit comments

Comments
 (0)