tests: fix leak on aggregate test.