From 6f25c3d9087427124e2cdb261e6a21d712706311 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Wed, 17 Apr 2024 15:00:42 +0800 Subject: [PATCH] fix: close pom.xml Signed-off-by: guoguangwu --- pkg/dependency/parser/java/pom/parse.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/dependency/parser/java/pom/parse.go b/pkg/dependency/parser/java/pom/parse.go index a1b42b712e28..c4ee45c5024b 100644 --- a/pkg/dependency/parser/java/pom/parse.go +++ b/pkg/dependency/parser/java/pom/parse.go @@ -592,6 +592,7 @@ func (p *parser) openPom(filePath string) (*pom, error) { if err != nil { return nil, xerrors.Errorf("file open error (%s): %w", filePath, err) } + defer f.Close() content, err := parsePom(f) if err != nil {