Fix some memory leaks in the unit tests These don't matter except inasmuch as they give real memory leaks a place to hide. Found with valgrind