Skip to content

Commit

Permalink
Better hygiene
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutchinson committed Mar 23, 2023
1 parent 10da4f9 commit 6d77e74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distributor/cmd/internal/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (d *Distributor) GetCheckpointN(ctx context.Context, logID string, n uint32
if err != nil {
return nil, fmt.Errorf("query failed: %v", err)
}
defer rows.Close()
var currentSize uint64
var witsAtSize []note.Verifier
var cpsAtSize [][]byte
Expand All @@ -102,6 +103,7 @@ func (d *Distributor) GetCheckpointN(ctx context.Context, logID string, n uint32
break
}
cpsAtSize = make([][]byte, 0)
witsAtSize = make([]note.Verifier, 0)
currentSize = size
}
witsAtSize = append(witsAtSize, d.ws[witID])
Expand Down

0 comments on commit 6d77e74

Please sign in to comment.