From e6e7b3cddd35aac138869d54d4e724c46361d21c Mon Sep 17 00:00:00 2001 From: tjr Date: Sun, 15 Dec 2002 11:26:57 +0000 Subject: [PATCH] When doing tail -F, return if the freopen() of the file fails instead of trying to use a null file pointer. --- usr.bin/tail/forward.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index 0f35fbd47ed..25facec287f 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -258,6 +258,7 @@ forward(fp, style, off, sbp) fp = freopen(fname, "r", fp); if (fp == NULL) { ierr(); + return; } else { *sbp = sb2; action = ADD_EVENTS; -- 2.45.0