diff options
author | 2014-06-06 22:44:18 +0000 | |
---|---|---|
committer | 2014-06-06 22:44:18 +0000 | |
commit | 6e64ce7fd5d7853c2890a8b7c610d68e2fff9ae4 (patch) | |
tree | f4c522f38a413af770b3786ad65f06fb8e9fcd67 | |
parent | s/assember/assembler/ before someone gets offended. At the last (diff) | |
download | wireguard-openbsd-6e64ce7fd5d7853c2890a8b7c610d68e2fff9ae4.tar.xz wireguard-openbsd-6e64ce7fd5d7853c2890a8b7c610d68e2fff9ae4.zip |
Allocate the struct itty array in ttystats_init() with M_ZERO.
ok millert
-rw-r--r-- | sys/kern/tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 75df0023733..ba7204889af 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.107 2014/05/30 02:12:04 tedu Exp $ */ +/* $OpenBSD: tty.c,v 1.108 2014/06/06 22:44:18 matthew Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -2370,7 +2370,7 @@ ttystats_init(struct itty **ttystats) struct tty *tp; *ttystats = malloc(tty_count * sizeof(struct itty), - M_SYSCTL, M_WAITOK); + M_SYSCTL, M_WAITOK|M_ZERO); for (tp = TAILQ_FIRST(&ttylist), itp = *ttystats; tp; tp = TAILQ_NEXT(tp, tty_link), itp++) { itp->t_dev = tp->t_dev; |