Add missing unlock on early return
This commit is contained in:
parent
99d39174f6
commit
ab8d9b9706
1
head.go
1
head.go
|
@ -1023,6 +1023,7 @@ func (s *stripeSeries) getOrSet(hash uint64, series *memSeries) (*memSeries, boo
|
||||||
s.locks[i].Lock()
|
s.locks[i].Lock()
|
||||||
|
|
||||||
if prev := s.hashes[i].get(hash, series.lset); prev != nil {
|
if prev := s.hashes[i].get(hash, series.lset); prev != nil {
|
||||||
|
s.locks[i].Unlock()
|
||||||
return prev, false
|
return prev, false
|
||||||
}
|
}
|
||||||
s.hashes[i].set(hash, series)
|
s.hashes[i].set(hash, series)
|
||||||
|
|
Loading…
Reference in New Issue