mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
ENH: fix memory leak
This commit is contained in:
parent
40e55ab780
commit
8b07c96090
@ -2406,12 +2406,14 @@ int cmake::CheckBuildSystem()
|
||||
{
|
||||
genName = "Unix Makefiles";
|
||||
}
|
||||
cmGlobalGenerator *ggd = this->CreateGlobalGenerator(genName);
|
||||
if (ggd)
|
||||
// this global generator is never set to the cmake object so it is never
|
||||
// deleted, so make it an auto_ptr
|
||||
std::auto_ptr<cmGlobalGenerator> ggd(this->CreateGlobalGenerator(genName));
|
||||
if (ggd.get())
|
||||
{
|
||||
// Check the dependencies in case source files were removed.
|
||||
std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
|
||||
lgd->SetGlobalGenerator(ggd);
|
||||
lgd->SetGlobalGenerator(ggd.get());
|
||||
lgd->CheckDependencies(mf, verbose, this->ClearBuildSystem);
|
||||
|
||||
// Check for multiple output pairs.
|
||||
|
Loading…
Reference in New Issue
Block a user