Fix a leak in the tests