From becdae2722be0abdb628c080c2519843a54d70e4 Mon Sep 17 00:00:00 2001 From: Pierre Guilleminot Date: Wed, 6 Nov 2024 15:56:49 +0100 Subject: [PATCH] fs: missing defered Cleanup() call to post analyzer fs --- 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