mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user