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:
Tianon Gravi
2022-10-14 18:14:32 +00:00
committed by GitHub

View File

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