summaryrefslogtreecommitdiffstats
path: root/usr.bin/tail/forward.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-12-15 11:26:57 +0000
committertjr <tjr@FreeBSD.org>2002-12-15 11:26:57 +0000
commite6e7b3cddd35aac138869d54d4e724c46361d21c (patch)
tree8a75eec5af883acd3670bc2a098910a9171156a9 /usr.bin/tail/forward.c
parentd09e2c570dcd18a0717014c29a9ce6d3a376e326 (diff)
downloadFreeBSD-src-e6e7b3cddd35aac138869d54d4e724c46361d21c.zip
FreeBSD-src-e6e7b3cddd35aac138869d54d4e724c46361d21c.tar.gz
When doing tail -F, return if the freopen() of the file fails instead of
trying to use a null file pointer.
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 0f35fbd..25facec 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;
OpenPOWER on IntegriCloud