aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorShintaro Kaneko <kaneshin0120@gmail.com>2017-01-30 00:06:15 +0800
committerShintaro Kaneko <kaneshin0120@gmail.com>2017-01-30 00:10:19 +0800
commit355a42f36d7e27578ecd645c0fc6e07d793b8154 (patch)
tree0da8f033e4e8ea94de64e7baf6b78834af149af7 /cmd/geth
parentc46c41eae35e3083090e5806932fc5076e53e37c (diff)
downloaddexon-355a42f36d7e27578ecd645c0fc6e07d793b8154.tar.gz
dexon-355a42f36d7e27578ecd645c0fc6e07d793b8154.tar.zst
dexon-355a42f36d7e27578ecd645c0fc6e07d793b8154.zip
cmd/geth, cmd/swarm: Fix to close file handler appropriately
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/chaincmd.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index c77bd554c..f38ee046f 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -123,6 +123,7 @@ func initGenesis(ctx *cli.Context) error {
if err != nil {
utils.Fatalf("failed to read genesis file: %v", err)
}
+ defer genesisFile.Close()
block, err := core.WriteGenesisBlock(chaindb, genesisFile)
if err != nil {