From 0e85f4ab184465a8980767360a6c412df8f3ae30 Mon Sep 17 00:00:00 2001 From: Shishir Mahajan Date: Thu, 17 Dec 2020 14:18:53 -0800 Subject: [PATCH] Fix issue #2: nil pointer exception in handleWait() --- containerd/driver.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/containerd/driver.go b/containerd/driver.go index b251706..00ed448 100644 --- a/containerd/driver.go +++ b/containerd/driver.go @@ -529,17 +529,15 @@ func (d *Driver) handleWait(ctx context.Context, handle *taskHandle, ch chan *dr exitStatusCh, err := handle.task.Wait(ctxWithTimeout) if err != nil { result = &drivers.ExitResult{ - Err: fmt.Errorf("executor: error waiting on process: %v", err), + ExitCode: 255, + Err: fmt.Errorf("executor: error waiting on process: %v", err), } } else { status := <-exitStatusCh code, _, err := status.Result() - if err != nil { - d.logger.Error(err.Error()) - return - } result = &drivers.ExitResult{ ExitCode: int(code), + Err: err, } }