lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/6] perf tools: Free {branch,mem}_info when freeing hist_entry
Date
From: Namhyung Kim <namhyung.kim@lge.com>

Those data should be free along with the associated hist_entry,
otherwise they'll be leaked.

Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/hist.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 52fe4e24502b..50030133fb3b 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -470,6 +470,8 @@ hist_entry__collapse(struct hist_entry *left, struct hist_entry *right)

void hist_entry__free(struct hist_entry *he)
{
+ free(he->branch_info);
+ free(he->mem_info);
free(he);
}

--
1.7.11.7


\
 
 \ /
  Last update: 2012-11-07 09:21    [W:0.140 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site