kernel - Fix memory leak on iocom terminaion
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Feb 2013 17:54:43 +0000 (09:54 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Feb 2013 17:54:43 +0000 (09:54 -0800)
commit085cb1ddbf6bf775e9fcdbf09d7e0d0d44711b11
tree0509077cbc95958691cc2fd1b6a2132eba1022ff
parent51bf8e9b90e371ed867e5fd82f8ad6fb74867b22
kernel - Fix memory leak on iocom terminaion

* freerd_state was being cleaned up by the reader thread, but during
  decomissioning the writer thread can simulate incoming packets
  to cleanly shutdown open transactions, and this can reload
  freerd_state.

* Move the cleanup for freerd_state and freewr_state out of the
  reader/writer threads and into kdmsg_iocom_uninit() proper.

* Fixes dangling 112 bytes of memory left allocated after uninit.
sys/kern/kern_dmsg.c