etcdctl/ctlv3: close bolt.DB in snapshot status

This commit is contained in:
Gyu-Ho Lee 2016-04-22 11:37:20 -07:00
parent 3ffbc4c8dd
commit 53abaf86c6

View File

@ -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))