diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-08-04 16:39:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-08-04 16:39:48 +0000 |
commit | b1ab130ebe1061631d5465253f2334914def8120 (patch) | |
tree | d5a4d46d9df35a23084d563a3149659ae7cd1c67 /sys/kern | |
parent | 78bcf4ed585ca5191e11d3677cf8d16c290defd5 (diff) |
clear rings before freeing them
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_subr.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index 802c71c78d5..2bb0490c46f 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_subr.c,v 1.7 2000/08/04 16:33:05 deraadt Exp $ */ +/* $OpenBSD: tty_subr.c,v 1.8 2000/08/04 16:39:47 deraadt Exp $ */ /* $NetBSD: tty_subr.c,v 1.13 1996/02/09 19:00:43 christos Exp $ */ /* @@ -120,10 +120,14 @@ void clfree(clp) struct clist *clp; { - if (clp->c_cs) + if (clp->c_cs) { + bzero(clp->c_cs, clp->c_cn); FREE(clp->c_cs, M_TTYS); - if (clp->c_cq) + } + if (clp->c_cq) { + bzero(clp->c_cq, QMEM(clp->c_cn)); FREE(clp->c_cq, M_TTYS); + } clp->c_cs = clp->c_cq = (u_char *)0; } |