diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index 5fea91c36..440dbd9ae 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -248,11 +248,13 @@ bool cmCreateTestSourceList::InitialPass(std::vector 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"