- Fixed potential memory leaks and use of freed memory.