Skip to content

Commit 5caf437

Browse files
authored
fix: close APKINDEX archive file (#6672)
Signed-off-by: guoguangwu <[email protected]>
1 parent a126e10 commit 5caf437

File tree

1 file changed

+1
-0
lines changed
  • pkg/fanal/analyzer/imgconf/apk

1 file changed

+1
-0
lines changed

pkg/fanal/analyzer/imgconf/apk/apk.go

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func (a alpineCmdAnalyzer) fetchApkIndexArchive(targetOS types.OS) (*apkIndex, e
103103
if err != nil {
104104
return nil, xerrors.Errorf("failed to read APKINDEX archive file: %w", err)
105105
}
106+
defer reader.(*builtinos.File).Close()
106107
} else {
107108
// nolint
108109
resp, err := http.Get(url)

0 commit comments

Comments
 (0)