mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl/ctlv3: close bolt.DB in snapshot status
This commit is contained in:
parent
3ffbc4c8dd
commit
53abaf86c6
@ -305,10 +305,11 @@ func dbStatus(p string) dbstatus {
|
||||
|
||||
ds := dbstatus{}
|
||||
|
||||
db, err := bolt.Open(p, 0600, nil)
|
||||
db, err := bolt.Open(p, 0400, nil)
|
||||
if err != nil {
|
||||
ExitWithError(ExitError, err)
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
h := crc32.New(crc32.MakeTable(crc32.Castagnoli))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user