From a82aaddb0ff1ce4a368eb3667abac5a34d7b1d90 Mon Sep 17 00:00:00 2001 From: guangwu Date: Thu, 4 Apr 2024 11:43:22 +0800 Subject: [PATCH] fix: close cpu profile --- cmd/evm/runner.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index 4063767cb8..ab45cbac37 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -223,6 +223,7 @@ func runCmd(ctx *cli.Context) error { fmt.Println("could not create CPU profile: ", err) os.Exit(1) } + defer f.Close() if err := pprof.StartCPUProfile(f); err != nil { fmt.Println("could not start CPU profile: ", err) os.Exit(1)