summaryrefslogtreecommitdiffhomepage
path: root/runsc
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-21 00:18:49 +0000
committergVisor bot <gvisor-bot@google.com>2021-05-21 00:18:49 +0000
commit6d8eb1b84af634f18956fbb6964df18dc65067c6 (patch)
tree52c01277c931333b159d25e948e58f09aa4c9e2c /runsc
parent75797290b93d5c473f504e6815b5c3784fefab40 (diff)
parentec542dbedf2f454b8c3e126a19b6910cd9425e92 (diff)
Merge release-20210510.0-64-gec542dbed (automated)
Diffstat (limited to 'runsc')
-rw-r--r--runsc/sandbox/sandbox.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go
index 8d31e33b2..29e202b7d 100644
--- a/runsc/sandbox/sandbox.go
+++ b/runsc/sandbox/sandbox.go
@@ -131,8 +131,9 @@ func New(conf *config.Config, args *Args) (*Sandbox, error) {
// The Cleanup object cleans up partially created sandboxes when an error
// occurs. Any errors occurring during cleanup itself are ignored.
c := cleanup.Make(func() {
- err := s.destroy()
- log.Warningf("error destroying sandbox: %v", err)
+ if err := s.destroy(); err != nil {
+ log.Warningf("error destroying sandbox: %v", err)
+ }
})
defer c.Clean()