Skip to content

Commit 1d7b2de

Browse files
geofffranksdavewalter
authored andcommitted
Reduce memory usage when calculating release shasum
1 parent 06bdb0e commit 1d7b2de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cargo/bosh_release.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func ReadBOSHReleaseTarball(tarballPath string, r io.Reader) (BOSHReleaseTarball
155155
if err != nil {
156156
return BOSHReleaseTarball{}, err
157157
}
158-
_, err = io.ReadAll(r)
158+
_, err = io.CopyBuffer(io.Discard, r, make([]byte, 1024 * 64))
159159
return BOSHReleaseTarball{
160160
Manifest: m,
161161
SHA1: hex.EncodeToString(sum.Sum(nil)),

0 commit comments

Comments
 (0)