From 355a42f36d7e27578ecd645c0fc6e07d793b8154 Mon Sep 17 00:00:00 2001 From: Shintaro Kaneko Date: Mon, 30 Jan 2017 01:06:15 +0900 Subject: cmd/geth, cmd/swarm: Fix to close file handler appropriately --- cmd/swarm/hash.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/swarm') diff --git a/cmd/swarm/hash.go b/cmd/swarm/hash.go index 0a20bea82..bcba77a2a 100644 --- a/cmd/swarm/hash.go +++ b/cmd/swarm/hash.go @@ -36,6 +36,7 @@ func hash(ctx *cli.Context) { fmt.Println("Error opening file " + args[1]) os.Exit(1) } + defer f.Close() stat, _ := f.Stat() chunker := storage.NewTreeChunker(storage.NewChunkerParams()) -- cgit