tests: plug leak in test case.