Skip to content

Commit

Permalink
trie: add missing unlock call in error case (#18985)
Browse files Browse the repository at this point in the history
  • Loading branch information
hackmod authored and fjl committed Feb 4, 2019
1 parent 98e0bed commit bb7c786
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions trie/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ func (db *Database) Commit(node common.Hash, report bool) error {
}
if batch.ValueSize() > ethdb.IdealBatchSize {
if err := batch.Write(); err != nil {
db.lock.RUnlock()
return err
}
batch.Reset()
Expand Down

0 comments on commit bb7c786

Please sign in to comment.