From ab32297e0a8220a427fa330025f8625281e02275 Mon Sep 17 00:00:00 2001 From: Pierre Guilleminot Date: Thu, 7 Nov 2024 11:22:29 +0100 Subject: [PATCH] fix(fs): add missing defered Cleanup() call to post analyzer fs (#7882) --- pkg/fanal/artifact/local/fs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/fanal/artifact/local/fs.go b/pkg/fanal/artifact/local/fs.go index 2f5ef7fe4ecd..b6c2d46c839a 100644 --- a/pkg/fanal/artifact/local/fs.go +++ b/pkg/fanal/artifact/local/fs.go @@ -82,6 +82,7 @@ func (a Artifact) Inspect(ctx context.Context) (artifact.Reference, error) { if err != nil { return artifact.Reference{}, xerrors.Errorf("failed to prepare filesystem for post analysis: %w", err) } + defer composite.Cleanup() err = a.walker.Walk(a.rootPath, a.artifactOption.WalkerOption, func(filePath string, info os.FileInfo, opener analyzer.Opener) error { dir := a.rootPath