diff options
Diffstat (limited to 'runsc/cmd/boot.go')
-rw-r--r-- | runsc/cmd/boot.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runsc/cmd/boot.go b/runsc/cmd/boot.go index b19da315f..70c4616b4 100644 --- a/runsc/cmd/boot.go +++ b/runsc/cmd/boot.go @@ -142,24 +142,23 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) } // Create the loader. - l, err := boot.New(spec, conf, b.controllerFD, b.restoreFD, b.ioFDs.GetArray(), b.console) - if err != nil { Fatalf("error creating loader: %v", err) } - defer l.Destroy() // Wait for the start signal from runsc. l.WaitForStartSignal() // Run the application and wait for it to finish. if err := l.Run(); err != nil { + l.Destroy() Fatalf("error running sandbox: %v", err) } ws := l.WaitExit() log.Infof("application exiting with %+v", ws) *waitStatus = syscall.WaitStatus(ws.Status()) + l.Destroy() return subcommands.ExitSuccess } |