content: use buffer pool in hash copy
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
e1eeb40d1d
commit
5ff837e2e7
1 changed files with 4 additions and 1 deletions
|
@ -284,7 +284,10 @@ func (cs *Store) Resume(ref string) (*Writer, error) {
|
||||||
}
|
}
|
||||||
defer fp.Close()
|
defer fp.Close()
|
||||||
|
|
||||||
offset, err := io.Copy(digester.Hash(), fp)
|
p := bufPool.Get().([]byte)
|
||||||
|
defer bufPool.Put(p)
|
||||||
|
|
||||||
|
offset, err := io.CopyBuffer(digester.Hash(), fp, p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue