Fix memory leak in demangling symbols for backtrace functionality 35/24435/2
authorAdam Malinowski <a.malinowsk2@partner.samsung.com>
Mon, 14 Jul 2014 10:01:30 +0000 (12:01 +0200)
committerAdam Malinowski <a.malinowsk2@partner.samsung.com>
Wed, 16 Jul 2014 06:36:19 +0000 (08:36 +0200)
Change-Id: If4525dd6f610b6e2fcc2e64c5d6b89e0bf20d0d5

src/common/log/Backtrace.cpp

index 26e3e02..d2e9550 100644 (file)
@@ -79,6 +79,7 @@ const std::string Backtrace::buildBacktrace(void) {
         snprintf(btstr, sizeof(btstr), "ip = %lx, sp = %lx, %s, %s:%d\n",
                 (long) ip, (long) sp, realname ? realname : proc_name,
                 m_fileName, m_lineNumber);
+        free(realname);
         backtrace += btstr;
     }