daemon/graphdriver/windows: Remove() don't use defer() in a loop
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c9d2b7df77
commit
75bdbf02a6
1 changed files with 1 additions and 1 deletions
|
@ -345,7 +345,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()
|
||||
|
@ -353,6 +352,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