summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-07-04 17:20:21 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-09 15:13:27 +0200
commitacc7bfb3db9744c4a18c96fd6536069e8647cb11 (patch)
tree78066b5eb128c37109b1f77087e9652966bc69d4 /tools
parentperf tools: Use list_del_init() more thorougly (diff)
downloadlinux-acc7bfb3db9744c4a18c96fd6536069e8647cb11.tar.xz
linux-acc7bfb3db9744c4a18c96fd6536069e8647cb11.zip
perf metricgroup: Add missing list_del_init() when flushing egroups list
So that at the end each of the entries have its list node struct cleared and the egroup list head ends emptied. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-dxzj1ah350fy9ec0xbhb15b6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/metricgroup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 0d8c840f88c0..416a9015405e 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -492,6 +492,7 @@ static void metricgroup__free_egroups(struct list_head *group_list)
for (i = 0; i < eg->idnum; i++)
zfree(&eg->ids[i]);
zfree(&eg->ids);
+ list_del_init(&eg->nd);
free(eg);
}
}