Fix: memory allocated for test suite references is freed
authorMarkus Kauppila
Wed, 08 Jun 2011 18:38:38 +0300
changeset 569082da33693536
parent 5689 f1ab815aa4af
child 5691 c0b4bcd901a0
Fix: memory allocated for test suite references is freed
test/test-automation/runner.c
     1.1 --- a/test/test-automation/runner.c	Tue Jun 07 21:11:11 2011 +0300
     1.2 +++ b/test/test-automation/runner.c	Wed Jun 08 18:38:38 2011 +0300
     1.3 @@ -479,5 +479,15 @@
     1.4  	printf("%d tests passed\n", passCount);
     1.5  	printf("%d tests failed\n", failureCount);
     1.6  
     1.7 +	// Deallocate the memory used by test suites
     1.8 +	TestSuiteReference *ref = suites;
     1.9 +	while(ref) {
    1.10 +		SDL_free(ref->name);
    1.11 +
    1.12 +		TestSuiteReference *temp = ref->next;
    1.13 +		SDL_free(ref);
    1.14 +		ref = temp;
    1.15 +	}
    1.16 +
    1.17  	return 0;
    1.18  }