From 285a8b701b14b897897d2ebc7ee2359313a98dd1 Mon Sep 17 00:00:00 2001 From: "Matt T. Proud" Date: Wed, 22 May 2013 14:23:35 +0200 Subject: [PATCH] Code Review: Extend lock. --- storage/metric/memory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/metric/memory.go b/storage/metric/memory.go index bbefb03dd..f31e6ddee 100644 --- a/storage/metric/memory.go +++ b/storage/metric/memory.go @@ -234,8 +234,8 @@ func (s *memorySeriesStorage) GetFingerprintsForLabelSet(l model.LabelSet) (fing func (s *memorySeriesStorage) GetFingerprintsForLabelName(l model.LabelName) (model.Fingerprints, error) { s.RLock() + defer s.RUnlock() values, ok := s.labelNameToFingerprints[l] - s.RUnlock() if !ok { return nil, nil }