Merge pull request #45390 from vvoland/c8d-imagelist-fix-rootlen

c8d/list: Initialize capacity instead of length
This commit is contained in:
Sebastiaan van Stijn 2023-04-25 12:26:41 +02:00 committed by GitHub
commit a343ed13e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,7 @@ func (i *ImageService) Images(ctx context.Context, opts types.ImageListOptions)
layers map[digest.Digest]int
)
if opts.SharedSize {
root = make([]*[]digest.Digest, len(imgs))
root = make([]*[]digest.Digest, 0, len(imgs))
layers = make(map[digest.Digest]int)
}