avoid memory leaks when running with --list

This commit is contained in:
Enno Rehling 2015-10-14 20:04:03 +02:00
parent 47eee29813
commit 203b058166
1 changed files with 2 additions and 2 deletions

View File

@ -58,11 +58,9 @@ bool list = false;
int RunAllTests(int argc, char *argv[]) int RunAllTests(int argc, char *argv[])
{ {
CuSuite *summary = CuSuiteNew();
int flags = log_flags; int flags = log_flags;
log_flags = LOG_FLUSH | LOG_CPERROR; log_flags = LOG_FLUSH | LOG_CPERROR;
game_init();
/* self-test */ /* self-test */
ADD_SUITE(tests); ADD_SUITE(tests);
@ -129,7 +127,9 @@ int RunAllTests(int argc, char *argv[])
ADD_SUITE(study); ADD_SUITE(study);
if (suites) { if (suites) {
CuSuite *summary = CuSuiteNew();
int fail_count; int fail_count;
game_init();
while (suites) { while (suites) {
suite *s = suites->next; suite *s = suites->next;
RunTests(suites->csuite, suites->name); RunTests(suites->csuite, suites->name);