Pārlūkot izejas kodu

trie: fix flaw in stacktrie pool reuse (#21699)

Martin Holst Swende 5 gadi atpakaļ
vecāks
revīzija
348c3bc47d
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      trie/stacktrie.go

+ 1 - 1
trie/stacktrie.go

@@ -113,7 +113,7 @@ func (st *StackTrie) Update(key, value []byte) {
 func (st *StackTrie) Reset() {
 	st.db = nil
 	st.key = st.key[:0]
-	st.val = st.val[:0]
+	st.val = nil
 	for i := range st.children {
 		st.children[i] = nil
 	}