aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tail/forward.c
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2002-12-15 11:26:57 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2002-12-15 11:26:57 +0000
commitf33ae51c774ec3e0fcfcd321c7b71a242aa34cf7 (patch)
tree8a75eec5af883acd3670bc2a098910a9171156a9 /usr.bin/tail/forward.c
parent616fa7460c1abbd54c641a619fe99fed73ec8d33 (diff)
When doing tail -F, return if the freopen() of the file fails instead of
trying to use a null file pointer.
Notes
Notes: svn path=/head/; revision=107901
Diffstat (limited to 'usr.bin/tail/forward.c')
-rw-r--r--usr.bin/tail/forward.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c
index 0f35fbd47edb..25facec287fe 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;