From 88340ba8086ba6caa188dc629e75f0110faa0c65 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 31 May 2024 16:01:16 +0800 Subject: [PATCH] fix: close testfile Signed-off-by: guoguangwu --- pkg/fanal/test/integration/docker/docker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/fanal/test/integration/docker/docker.go b/pkg/fanal/test/integration/docker/docker.go index 13ba250d4444..772aef0778f2 100644 --- a/pkg/fanal/test/integration/docker/docker.go +++ b/pkg/fanal/test/integration/docker/docker.go @@ -81,6 +81,7 @@ func (d Docker) ReplicateImage(ctx context.Context, imageRef, imagePath string, if err != nil { return err } + defer testfile.Close() // load image into docker engine resp, err := d.cli.ImageLoad(ctx, testfile, true)