kernel - Fix pty registration, memory leak
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 13 Aug 2010 01:55:20 +0000 (18:55 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 13 Aug 2010 01:58:48 +0000 (18:58 -0700)
commitddac2002e1c0b5c573dc3e05d7d2ebbab9547af6
tree66b98b331e46bfe37ab4db908125b9a78294d76e
parentb80b4c328a74f1d0c2f262272a7170d10546d957
kernel - Fix pty registration, memory leak

* Properly unregister the pt_ioctl before freeing it.

* Free the pt_ioctl structure after destroying the device, fixing
  a memory leak.

* Fix races in the sysctl_proc which iterates the tty list by using
  a marker.
sys/kern/tty.c
sys/kern/tty_pty.c
sys/sys/tty.h