Don't dereference null vnode pointer if controling terminal was revoked.
Submitted by: "Peter Edwards" <pmedwards@eircom.net>
This commit is contained in:
parent
341e476e25
commit
109751d28c
@ -70,10 +70,12 @@ ctty_clone(void *arg, char *name, int namelen, dev_t *dev)
|
||||
return;
|
||||
if (strcmp(name, "tty"))
|
||||
return;
|
||||
if (curthread->td_proc->p_flag & P_CONTROLT)
|
||||
*dev = curthread->td_proc->p_session->s_ttyvp->v_rdev;
|
||||
else
|
||||
if (!(curthread->td_proc->p_flag & P_CONTROLT))
|
||||
*dev = ctty;
|
||||
else if (curthread->td_proc->p_session->s_ttyvp == NULL)
|
||||
*dev = ctty;
|
||||
else
|
||||
*dev = curthread->td_proc->p_session->s_ttyvp->v_rdev;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user