1) don't need tree if memory is just malloc'd 2) fix memory and free list leak.. 3) deregister first and then free... doh.. This commit was SVN r10251.