From 9c5f1bba63e1932c04ab9a40a589b79ae86dfeda Mon Sep 17 00:00:00 2001 From: milleniumbug Date: Tue, 19 Apr 2016 23:51:02 +0200 Subject: [PATCH] Fixed minor memory leak Nuke raw calls to `new` from orbit, any one of them becomes a potential to leak. --- src/project_build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/project_build.cc b/src/project_build.cc index 430d0fb..a00729c 100644 --- a/src/project_build.cc +++ b/src/project_build.cc @@ -2,9 +2,9 @@ #include "config.h" std::unique_ptr Project::get_build(const boost::filesystem::path &path) { - auto cmake=new CMake(path); + std::unique_ptr cmake(new CMake(path)); if(!cmake->project_path.empty()) - return std::unique_ptr(cmake); + return cmake; else return std::unique_ptr(new Project::Build()); }