Browse Source

Fixed minor memory leak

Nuke raw calls to `new` from orbit, any one of them becomes a potential to leak.
merge-requests/365/head
milleniumbug 10 years ago
parent
commit
9c5f1bba63
No known key found for this signature in database
GPG Key ID: E069867FCF5D84EA
  1. 4
      src/project_build.cc

4
src/project_build.cc

@ -2,9 +2,9 @@
#include "config.h"
std::unique_ptr<Project::Build> Project::get_build(const boost::filesystem::path &path) {
auto cmake=new CMake(path);
std::unique_ptr<Project::Build> cmake(new CMake(path));
if(!cmake->project_path.empty())
return std::unique_ptr<Project::Build>(cmake);
return cmake;
else
return std::unique_ptr<Project::Build>(new Project::Build());
}

Loading…
Cancel
Save