manager: fix memory leak 28/151728/2
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 21 Sep 2017 13:46:28 +0000 (16:46 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 21 Sep 2017 17:24:51 +0000 (20:24 +0300)
Change-Id: I5ecb9f0a4f8f14f4045de4f60f23eeb664009295
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
daemon/cpp/elf/Elf.cpp

index 0ece1f0..53459fa 100644 (file)
@@ -25,6 +25,7 @@
 #include <parse_elf.h>
 #include "Elf.h"
 #include "swap_debug.h"
+#include <utils/unique_ptr.h>
 
 
 uint64_t Elf::plt(const std::string &path, const std::string &funcName)
@@ -34,6 +35,7 @@ uint64_t Elf::plt(const std::string &path, const std::string &funcName)
         LOGE("Cannot init elfp, filename='%s'\n", path.c_str());
         return 0;
     }
+    auto e_ptr = makeUnique(e, elfp_uninit);
 
     size_t n = elfp_plt_count(e);
     std::unique_ptr<uint64_t[]> addr(new uint64_t[n]);