mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
core/state/snapshot: acquire the lock on release
This commit is contained in:
parent
fd5078c779
commit
4c8dc88a48
1 changed files with 3 additions and 0 deletions
|
|
@ -666,6 +666,9 @@ func diffToDisk(bottom *diffLayer) *diskLayer {
|
|||
|
||||
// Release releases resources
|
||||
func (t *Tree) Release() {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
|
||||
if dl := t.disklayer(); dl != nil {
|
||||
dl.Release()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue