mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #44281 from thaJeztah/windows_filter_defer_in_loop
daemon/graphdriver/windows: Remove() don't use defer() in a loop
This commit is contained in:
@@ -313,7 +313,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()
|
||||
@@ -321,6 +320,7 @@ func (d *Driver) Remove(id string) error {
|
||||
err = nil
|
||||
}
|
||||
|
||||
_ = container.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user