From a40b66bf635a10767581fd119715be7850912ef0 Mon Sep 17 00:00:00 2001 From: Markus Kauppila Date: Wed, 8 Jun 2011 18:38:38 +0300 Subject: [PATCH] Fix: memory allocated for test suite references is freed --- test/test-automation/runner.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test-automation/runner.c b/test/test-automation/runner.c index 662043436..6ffa83ea9 100644 --- a/test/test-automation/runner.c +++ b/test/test-automation/runner.c @@ -479,5 +479,15 @@ main(int argc, char *argv[]) printf("%d tests passed\n", passCount); printf("%d tests failed\n", failureCount); + // Deallocate the memory used by test suites + TestSuiteReference *ref = suites; + while(ref) { + SDL_free(ref->name); + + TestSuiteReference *temp = ref->next; + SDL_free(ref); + ref = temp; + } + return 0; }