Skip to content

Commit

Permalink
fix(blooms): Fix panic in bloom gateway (#13303)
Browse files Browse the repository at this point in the history
The slice of block queriers can contain `nil` values, which causes nip pointer dereference when calling `Close()` on them.

Signed-off-by: Christian Haudum <[email protected]>
  • Loading branch information
chaudum authored Jun 25, 2024
1 parent 0cb3ff1 commit 66f97b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/bloomgateway/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (p *processor) processBlocks(ctx context.Context, bqs []*bloomshipper.Close
hasClosed := make([]bool, len(bqs))
defer func() {
for i, bq := range bqs {
if !hasClosed[i] {
if bq != nil && !hasClosed[i] {
_ = bq.Close()
}
}
Expand Down

0 comments on commit 66f97b2

Please sign in to comment.