mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/utils: frdb close if not nil
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
38c200209a
commit
ec5a4e6c3a
1 changed files with 3 additions and 1 deletions
|
|
@ -2091,8 +2091,10 @@ func tryMakeReadOnlyDatabase(ctx *cli.Context, stack *node.Node) ethdb.Database
|
||||||
if err != nil {
|
if err != nil {
|
||||||
readonly = false
|
readonly = false
|
||||||
}
|
}
|
||||||
|
if frdb != nil {
|
||||||
frdb.Close()
|
frdb.Close()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return MakeChainDatabase(ctx, stack, readonly)
|
return MakeChainDatabase(ctx, stack, readonly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue