Fix: memory allocated for test suite references is freed
authorMarkus Kauppila <markus.kauppila@gmail.com>
Wed, 08 Jun 2011 18:38:38 +0300
changeset 5690 82da33693536
parent 5689 f1ab815aa4af
child 5691 c0b4bcd901a0
Fix: memory allocated for test suite references is freed
test/test-automation/runner.c
--- a/test/test-automation/runner.c	Tue Jun 07 21:11:11 2011 +0300
+++ b/test/test-automation/runner.c	Wed Jun 08 18:38:38 2011 +0300
@@ -479,5 +479,15 @@
 	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;
 }