Skip to content

Commit

Permalink
Merge pull request #834 from mackerelio/fix-check-log-nil-ptr
Browse files Browse the repository at this point in the history
Fix: check-log panic with invalid memory address or nil pointer dereference
  • Loading branch information
ne-sachirou authored Apr 15, 2024
2 parents e59230a + eb5539e commit bfe4a9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions check-log/lib/check-log.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ func findFileByInode(inode uint, dir string) (string, error) {
if err != nil && !errors.Is(err, os.ErrNotExist) {
return "", err
}
if fi == nil {
continue
}
if detectInode(fi) == inode {
return filepath.Join(dir, fi.Name()), nil
}
Expand Down

0 comments on commit bfe4a9d

Please sign in to comment.