From 0eb4a2d38f4174975a39b6326596a69dba972a70 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 24 May 2024 18:02:52 +0800 Subject: [PATCH] fix: close settings.xml Signed-off-by: guoguangwu --- pkg/dependency/parser/java/pom/settings.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/dependency/parser/java/pom/settings.go b/pkg/dependency/parser/java/pom/settings.go index 42153155706a..7045f438beaf 100644 --- a/pkg/dependency/parser/java/pom/settings.go +++ b/pkg/dependency/parser/java/pom/settings.go @@ -68,6 +68,7 @@ func openSettings(filePath string) (settings, error) { if err != nil { return settings{}, err } + defer f.Close() s := settings{} decoder := xml.NewDecoder(f)