Skip to content

Commit

Permalink
Fix: check-log panic with invalid memory address or nil pointer deref…
Browse files Browse the repository at this point in the history
…erence
  • Loading branch information
ne-sachirou committed Apr 12, 2024
1 parent e59230a commit eb5539e
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 eb5539e

Please sign in to comment.