mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 17:39:22 +00:00
Fix potential containerd panic.
Signed-off-by: Lantao Liu <lantaol@google.com> Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
committed by
Michael Crosby
parent
2fd20f11fa
commit
7daf0804fc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user