daemon/graphdriver/windows: Remove() don't use defer() in a loop
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 75bdbf02a6
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
2d12e69c9f
commit
a12d359c1a
1 changed files with 1 additions and 1 deletions
|
@ -314,7 +314,6 @@ func (d *Driver) Remove(id string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer container.Close()
|
||||
err = container.Terminate()
|
||||
if hcsshim.IsPending(err) {
|
||||
err = container.Wait()
|
||||
|
@ -322,6 +321,7 @@ func (d *Driver) Remove(id string) error {
|
|||
err = nil
|
||||
}
|
||||
|
||||
_ = container.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue