linux: freebsd: do check on proper pointer