diff options
author | 2001-12-27 22:34:36 +0000 | |
---|---|---|
committer | 2001-12-27 22:34:36 +0000 | |
commit | 2b355e45cc76b99d0b3a34655ce787e4fe6210d7 (patch) | |
tree | c952a93602f842d8fb4bd648d100476e100840eb | |
parent | Don't mess with the PMAP_PHYSSEG flags there. It's UVM playground, not really (diff) | |
download | wireguard-openbsd-2b355e45cc76b99d0b3a34655ce787e4fe6210d7.tar.xz wireguard-openbsd-2b355e45cc76b99d0b3a34655ce787e4fe6210d7.zip |
Increment reference count when copying session pointer pr#2112. ok deraadt@
-rw-r--r-- | sys/kern/tty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 62c3451121d..d6a553af795 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.48 2001/11/06 19:53:20 miod Exp $ */ +/* $OpenBSD: tty.c,v 1.49 2001/12/27 22:34:36 nordin Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -982,6 +982,7 @@ ttioctl(tp, cmd, data, flag, p) ((p->p_session->s_ttyvp || tp->t_session) && (tp->t_session != p->p_session))) return (EPERM); + SESSHOLD(p->p_session); tp->t_session = p->p_session; tp->t_pgrp = p->p_pgrp; p->p_session->s_ttyp = tp; |