summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 21d47e2..3a53294 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -710,6 +710,7 @@ pty_clone(void *arg, char *name, int namelen, struct cdev **dev)
return;
*dev = make_dev(&ptc_cdevsw, u,
UID_ROOT, GID_WHEEL, 0666, "pty%c%r", names[u / 32], u % 32);
+ dev_ref(*dev);
(*dev)->si_flags |= SI_CHEAPCLONE;
return;
}
OpenPOWER on IntegriCloud