From ceea57b46d9a47db76e57139caca16899db07c62 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 24 Jan 2026 14:07:41 +0100 Subject: [PATCH] cli/command/container: copyDockerConfigIntoContainer: close TarWriter Signed-off-by: Sebastiaan van Stijn --- cli/command/container/create.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/command/container/create.go b/cli/command/container/create.go index d070d8d15f..f70e474338 100644 --- a/cli/command/container/create.go +++ b/cli/command/container/create.go @@ -428,6 +428,7 @@ func copyDockerConfigIntoContainer(ctx context.Context, apiClient client.APIClie }) if _, err := io.Copy(tarWriter, &configBuf); err != nil { + _ = tarWriter.Close() return fmt.Errorf("writing config to tar file for config copy: %w", err) }