mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Do not call Put twice and do not call it on defer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
4e9164ff5f
commit
d277a4c0f8
1 changed files with 1 additions and 1 deletions
2
image.go
2
image.go
|
@ -163,7 +163,7 @@ func (img *Image) TarLayer() (arch archive.Archive, err error) {
|
|||
}
|
||||
|
||||
defer func() {
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
driver.Put(img.ID)
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue