summaryrefslogtreecommitdiff
path: root/Source/cmWhileCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-06-28 11:16:36 -0400
committerKen Martin <ken.martin@kitware.com>2008-06-28 11:16:36 -0400
commit52d8b1b5d9463eb6e9d417db9e66c3e00ad1b938 (patch)
tree809f48ccb928ba006aa0d394ec2bf0e9fcb1e091 /Source/cmWhileCommand.cxx
parent3cc9efceb76f9a6485fd52865c9e4693f16cc9b2 (diff)
downloadcmake-52d8b1b5d9463eb6e9d417db9e66c3e00ad1b938.tar.gz
BUG: fix memory leak and cleanup error string code
Diffstat (limited to 'Source/cmWhileCommand.cxx')
-rw-r--r--Source/cmWhileCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index 4ebedce458..21fc286b4d 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -39,12 +39,12 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
// if this is the endwhile for this while loop then execute
if (!this->Depth)
{
- char* errorString = 0;
+ std::string errorString;
std::vector<std::string> expandedArguments;
mf.ExpandArguments(this->Args, expandedArguments);
bool isTrue =
- cmIfCommand::IsTrue(expandedArguments,&errorString,&mf);
+ cmIfCommand::IsTrue(expandedArguments,errorString,&mf);
this->Executing = true;
while (isTrue)
@@ -69,7 +69,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
expandedArguments.clear();
mf.ExpandArguments(this->Args, expandedArguments);
isTrue =
- cmIfCommand::IsTrue(expandedArguments,&errorString,&mf);
+ cmIfCommand::IsTrue(expandedArguments,errorString,&mf);
}
mf.RemoveFunctionBlocker(lff);
return true;