Add missing unlock on early return

pull/5805/head
Fabian Reinartz 7 years ago
parent 99d39174f6
commit ab8d9b9706

@ -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…
Cancel
Save