From 203b058166133304f6f1cd7a4b2d3a8ff3ee6b35 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 14 Oct 2015 20:04:03 +0200 Subject: [PATCH] avoid memory leaks when running with --list --- src/test_eressea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test_eressea.c b/src/test_eressea.c index 71b7137ee..aad65c539 100644 --- a/src/test_eressea.c +++ b/src/test_eressea.c @@ -58,11 +58,9 @@ bool list = false; int RunAllTests(int argc, char *argv[]) { - CuSuite *summary = CuSuiteNew(); int flags = log_flags; log_flags = LOG_FLUSH | LOG_CPERROR; - game_init(); /* self-test */ ADD_SUITE(tests); @@ -129,7 +127,9 @@ int RunAllTests(int argc, char *argv[]) ADD_SUITE(study); if (suites) { + CuSuite *summary = CuSuiteNew(); int fail_count; + game_init(); while (suites) { suite *s = suites->next; RunTests(suites->csuite, suites->name);