Fix potential containerd panic.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
ca65dc9316
commit
7bd8dcd0d3
@ -111,9 +111,11 @@ func (p *process) Start(ctx context.Context) error {
|
||||
ExecID: p.id,
|
||||
})
|
||||
if err != nil {
|
||||
p.io.Cancel()
|
||||
p.io.Wait()
|
||||
p.io.Close()
|
||||
if p.io != nil {
|
||||
p.io.Cancel()
|
||||
p.io.Wait()
|
||||
p.io.Close()
|
||||
}
|
||||
return errdefs.FromGRPC(err)
|
||||
}
|
||||
p.pid = r.Pid
|
||||
|
Loading…
Reference in New Issue
Block a user