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
commit 6b2328e5cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}