- Fix a botch in previous commit; oldvp should not be unconditionally

assigned.
This commit is contained in:
Jeff Roberson 2002-09-26 02:54:30 +00:00
parent 4fed818c7e
commit 2a96b2d69f

View File

@ -608,11 +608,12 @@ spec_close(ap)
if (td && vp == td->td_proc->p_session->s_ttyvp) {
SESS_LOCK(td->td_proc->p_session);
VI_LOCK(vp);
if (vcount(vp) == 2 && (vp->v_iflag & VI_XLOCK) == 0)
if (vcount(vp) == 2 && (vp->v_iflag & VI_XLOCK) == 0) {
td->td_proc->p_session->s_ttyvp = NULL;
oldvp = vp;
}
VI_UNLOCK(vp);
SESS_UNLOCK(td->td_proc->p_session);
oldvp = vp;
}
sx_xunlock(&proctree_lock);
if (oldvp != NULL)