devfs: fix use count leak when using TIOCSCTTY
by matching devfs_ctty_ref
Fixes: 3b44443626
("devfs: rework si_usecount to track opens")
This commit is contained in:
parent
57785538c6
commit
3bc17248d3
@ -974,7 +974,7 @@ devfs_ioctl(struct vop_ioctl_args *ap)
|
||||
|
||||
/* Get rid of reference to old control tty */
|
||||
if (vpold)
|
||||
vrele(vpold);
|
||||
devfs_ctty_unref(vpold);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user