diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-28 19:16:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-28 19:16:05 +0000 |
commit | e46bfca6710ab4a9d3a0804a563e9edf01f4b965 (patch) | |
tree | 400891317ff32ed6d2fd1c725e4cc172e59a67cc /sys/kern/tty_pty.c | |
parent | fb9f36b38d11a2842612d02afa38aee00b2fd3fa (diff) |
easy size for free(); ok beck
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r-- | sys/kern/tty_pty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index d54d455bc79..71e5d2777e1 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.70 2015/02/10 21:56:10 miod Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.71 2015/09/28 19:16:04 deraadt Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -181,7 +181,7 @@ check_pty(int minor) newpt = ptyarralloc(newnpty); memcpy(newpt, pt_softc, npty * sizeof(struct pt_softc *)); - free(pt_softc, M_DEVBUF, 0); + free(pt_softc, M_DEVBUF, npty * sizeof(struct pt_softc *)); pt_softc = newpt; npty = newnpty; } |