Просмотр исходного кода

Fixed memory leak in test harness.

Found by Cppcheck.
Philipp Wiesemann 10 лет назад
Родитель
Сommit
4679195dbf
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/test/SDL_test_harness.c

+ 1 - 0
src/test/SDL_test_harness.c

@@ -484,6 +484,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user
         if (suiteFilter == 0 && testFilter == 0) {
         if (suiteFilter == 0 && testFilter == 0) {
             SDLTest_LogError("Filter '%s' did not match any test suite/case.", filter);
             SDLTest_LogError("Filter '%s' did not match any test suite/case.", filter);
             SDLTest_Log("Exit code: 2");
             SDLTest_Log("Exit code: 2");
+            SDL_free(failedTests);
             return 2;
             return 2;
         }
         }
     }
     }