diff --git a/cmd/cmd.go b/cmd/cmd.go index 65873bfb5..b6f4bc4ba 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -444,6 +444,11 @@ func initConfig() { } atexit.Register(func() { pprof.StopCPUProfile() + err := f.Close() + if err != nil { + err = fs.CountError(err) + log.Fatal(err) + } }) }