Skip to content

Commit

Permalink
Fix buffer leak when chunk is already stored
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbuenemann committed Sep 6, 2020
1 parent 29e26fa commit ce4ac34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions chunk/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (s *Storage) Store(id string, chunk []byte) error {
if _, exists := s.chunks[id]; exists {
s.stack.Touch(id)
s.lock.RUnlock()
s.BufferPool.Put(chunk)
return nil
}

Expand Down

0 comments on commit ce4ac34

Please sign in to comment.