Fixed minor memory leak in the test code.