summaryrefslogtreecommitdiff
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2006-12-19 16:46:13 +0000
committerMartin Blapp <mbr@FreeBSD.org>2006-12-19 16:46:13 +0000
commite0b43fcf443e356a3512be460ebd8bb55807d004 (patch)
treead8872477d3733129dcac213a69eab150aafe7d8 /sys/kern/tty.c
parentd733ccfbc286e53e8b3fd5aed4cb179ec4bc17e6 (diff)
Notes
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 5e7c5969fa10..cdb790615df1 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -340,7 +340,7 @@ tty_close(struct tty *tp)
* this method. Only the thread clearing TS_ISOPEN should
* release the reference to the tty.
*/
- if (ISSET(ostate, TS_ISOPEN))
+ if (ISSET(ostate, TS_ISOPEN) && tp->t_refcnt > 1)
ttyrel(tp);
splx(s);
return (0);