Skip to content

Commit

Permalink
fix: close APKINDEX archive file (#6672)
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill authored May 13, 2024
1 parent a126e10 commit 5caf437
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/fanal/analyzer/imgconf/apk/apk.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (a alpineCmdAnalyzer) fetchApkIndexArchive(targetOS types.OS) (*apkIndex, e
if err != nil {
return nil, xerrors.Errorf("failed to read APKINDEX archive file: %w", err)
}
defer reader.(*builtinos.File).Close()
} else {
// nolint
resp, err := http.Get(url)
Expand Down

0 comments on commit 5caf437

Please sign in to comment.