c8d/import: Don't close compressed stream twice
The compressor is already closed a few lines below and there's no error returns between so the defer is not needed. Calling Close twice on a writerCloserWrapper is unsafe as it causes it to put the same buffer to the pool multiple times. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
62725ab277
commit
1cb45e582c
1 changed files with 0 additions and 1 deletions
|
@ -258,7 +258,6 @@ func compressAndWriteBlob(ctx context.Context, cs content.Store, compression arc
|
|||
if err != nil {
|
||||
return "", "", errdefs.InvalidParameter(err)
|
||||
}
|
||||
defer compressor.Close()
|
||||
|
||||
writeChan := make(chan digest.Digest)
|
||||
// Start copying the blob to the content store from the pipe.
|
||||
|
|
Loading…
Add table
Reference in a new issue