daemon/graphdriver/windows: Remove() don't use defer() in a loop

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 75bdbf02a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-10-10 17:18:33 +02:00
parent 2d12e69c9f
commit a12d359c1a
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,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()
@ -322,6 +321,7 @@ func (d *Driver) Remove(id string) error {
err = nil
}
_ = container.Close()
if err != nil {
return err
}