tests: plug leaks