Skip to content

Commit

Permalink
Close file after fingerprinting
Browse files Browse the repository at this point in the history
  • Loading branch information
rdner committed Jun 10, 2023
1 parent bf25f92 commit 3fc3bac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions filebeat/input/filestream/identifier_fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (i *fingerprintIdentifier) getFingerprint(filename string) (fingerprint str
if err != nil {
return "", fmt.Errorf("failed to open %q for fingerprinting: %w", filename, err)
}
defer file.Close()

if i.cfg.Offset != 0 {
_, err = file.Seek(i.cfg.Offset, io.SeekStart)
Expand Down

0 comments on commit 3fc3bac

Please sign in to comment.