Browse Source

fixed some compiler warnings and leaks

Ken Martin 23 years ago
parent
commit
e1b6ba9f95
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/cmCreateTestSourceList.cxx

+ 2 - 0
Source/cmCreateTestSourceList.cxx

@@ -248,11 +248,13 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
     "    test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);\n"
     "    if (partial_match && strstr(test_name, arg) != NULL)\n"
     "      {\n"
+    "      free(arg);\n"
     "      free(test_name);\n"
     "      return (*cmakeGeneratedFunctionMapEntries[i].func)(ac - 2, av + 2);\n"
     "      }\n"
     "    else if (!partial_match && strcmp(test_name, arg) == 0)\n"
     "      {\n"
+    "      free(arg);\n"
     "      free(test_name);\n"
     "      return (*cmakeGeneratedFunctionMapEntries[i].func)(ac - 1, av + 1);\n"
     "      }\n"