From ab8d9b97069a64926ef7245d54a87051b86bc3ea Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Mon, 18 Sep 2017 11:23:22 +0200 Subject: [PATCH] Add missing unlock on early return --- head.go | 1 + 1 file changed, 1 insertion(+) diff --git a/head.go b/head.go index ea7b63f8a..40a4eb5b9 100644 --- a/head.go +++ b/head.go @@ -1023,6 +1023,7 @@ func (s *stripeSeries) getOrSet(hash uint64, series *memSeries) (*memSeries, boo s.locks[i].Lock() if prev := s.hashes[i].get(hash, series.lset); prev != nil { + s.locks[i].Unlock() return prev, false } s.hashes[i].set(hash, series)