aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 1f9f8695f05..d609afbd1a3 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -83,6 +83,7 @@ static int perf_session__add_hist_entry(struct perf_session *self,
83{ 83{
84 struct symbol **syms = NULL, *parent = NULL; 84 struct symbol **syms = NULL, *parent = NULL;
85 bool hit; 85 bool hit;
86 int err;
86 struct hist_entry *he; 87 struct hist_entry *he;
87 struct event_stat_id *stats; 88 struct event_stat_id *stats;
88 struct perf_event_attr *attr; 89 struct perf_event_attr *attr;
@@ -109,8 +110,11 @@ static int perf_session__add_hist_entry(struct perf_session *self,
109 if (symbol_conf.use_callchain) { 110 if (symbol_conf.use_callchain) {
110 if (!hit) 111 if (!hit)
111 callchain_init(&he->callchain); 112 callchain_init(&he->callchain);
112 append_chain(&he->callchain, data->callchain, syms); 113 err = append_chain(&he->callchain, data->callchain, syms);
113 free(syms); 114 free(syms);
115
116 if (err)
117 return err;
114 } 118 }
115 119
116 return 0; 120 return 0;