tests: test-multi-match.c: Fix memory leaks in test