Address minor file descriptor leak in CollectTar.

Before this commit, the reader opened by `GetBlob` was not closed.
This does not matter for the current implementation of the S3 backend,
but for the FS backend the file descriptor was only closed by
the `os.file` finalizer.

V12-Ref: F-77205
This commit is contained in:
Catherine
2026-05-30 18:13:49 +00:00
parent ec66cdb6b4
commit c591959fa9
+3
View File
@@ -72,6 +72,9 @@ func CollectTar(
return
}
blobData, err = io.ReadAll(blobReader)
if closer, ok := blobReader.(io.Closer); ok {
defer closer.Close()
}
if err != nil {
return
}