Fix memory leaks in some libcola test cases.