We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c46c41e commit 355a42fCopy full SHA for 355a42f
cmd/geth/chaincmd.go
@@ -123,6 +123,7 @@ func initGenesis(ctx *cli.Context) error {
123
if err != nil {
124
utils.Fatalf("failed to read genesis file: %v", err)
125
}
126
+ defer genesisFile.Close()
127
128
block, err := core.WriteGenesisBlock(chaindb, genesisFile)
129
cmd/swarm/hash.go
@@ -36,6 +36,7 @@ func hash(ctx *cli.Context) {
36
fmt.Println("Error opening file " + args[1])
37
os.Exit(1)
38
39
+ defer f.Close()
40
41
stat, _ := f.Stat()
42
chunker := storage.NewTreeChunker(storage.NewChunkerParams())
0 commit comments