mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmctl: properly close file descriptor in verify-block
action (#6106)
This commit is contained in:
parent
66c5fc3243
commit
9dd5db2b77
1 changed files with 1 additions and 0 deletions
|
@ -372,6 +372,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cli.Exit(fmt.Errorf("cannot open exported block at path=%q err=%w", blockPath, err), 1)
|
return cli.Exit(fmt.Errorf("cannot open exported block at path=%q err=%w", blockPath, err), 1)
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
var blocksCount atomic.Uint64
|
var blocksCount atomic.Uint64
|
||||||
if err := stream.Parse(f, isBlockGzipped, func(_ *stream.Block) error {
|
if err := stream.Parse(f, isBlockGzipped, func(_ *stream.Block) error {
|
||||||
blocksCount.Add(1)
|
blocksCount.Add(1)
|
||||||
|
|
Loading…
Reference in a new issue