Fix go-vet issue

This fix fixes the following issue with `go vet`:
```
$ go tool vet cmd/dockerd/daemon.go
cmd/dockerd/daemon.go:163: the cancel function is not used on all paths (possible context leak)
cmd/dockerd/daemon.go:167: this return statement may be reached without using the cancel var defined on line 163
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2019-02-06 23:30:28 +00:00
parent f8e29fdd68
commit 86312a4732

View file

@ -164,6 +164,7 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
if cli.Config.ContainerdAddr == "" && runtime.GOOS != "windows" {
systemContainerdAddr, ok, err := systemContainerdRunning(cli.Config.IsRootless())
if err != nil {
cancel()
return errors.Wrap(err, "could not determine whether the system containerd is running")
}
if !ok {