diff --git a/libcontainerd/remote/client.go b/libcontainerd/remote/client.go index 8bdea8c2c7..7b30e7a860 100644 --- a/libcontainerd/remote/client.go +++ b/libcontainerd/remote/client.go @@ -154,7 +154,8 @@ func (c *container) Start(ctx context.Context, checkpointDir string, withStdin b if checkpointDir != "" { // write checkpoint to the content store tar := archive.Diff(ctx, "", checkpointDir) - cp, err := c.client.writeContent(ctx, images.MediaTypeContainerd1Checkpoint, checkpointDir, tar) + var err error + cp, err = c.client.writeContent(ctx, images.MediaTypeContainerd1Checkpoint, checkpointDir, tar) // remove the checkpoint when we're done defer func() { if cp != nil {