From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> tracecmd_close() does not free up the page_maps for when it reads v6 files. This was found via valgrind. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- lib/trace-cmd/trace-input.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index 358b47935602..a902cfbdc567 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -4447,6 +4447,7 @@ void tracecmd_close(struct tracecmd_input *handle) struct zchunk_cache *cache; struct file_section *del_sec; struct cpu_data *cpu_data; + struct page_map *page_map, *n; int cpu; int i; @@ -4491,6 +4492,10 @@ void tracecmd_close(struct tracecmd_input *handle) free(cache); } free(cpu_data->compress.chunks); + list_for_each_entry_safe(page_map, n, &cpu_data->page_maps, list) { + list_del(&page_map->list); + free(page_map); + } } } -- 2.35.1