diff --git a/examples/remote-benchmark/node1/main.go b/examples/remote-benchmark/node1/main.go index 9c1cccc34..336e1e12e 100644 --- a/examples/remote-benchmark/node1/main.go +++ b/examples/remote-benchmark/node1/main.go @@ -56,6 +56,7 @@ func main() { if err != nil { log.Fatal(err) } + defer f.Close() pprof.StartCPUProfile(f) defer pprof.StopCPUProfile() }