1
0
Fork 0
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:
Michael Crosby 2014-02-03 15:36:06 -08:00
parent 4e9164ff5f
commit d277a4c0f8

View file

@ -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)
}
}()