security/logcheck: Fix runtime error with bsdgrep
PR: 251778 Submitted by: Yasuhiro Kimura <yasu@utahime.org> (maintainer)