summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-04-10 12:02:54 +0300
committerJiri Olsa <jolsa@redhat.com>2014-04-15 13:57:14 +0200
commitae450a7d054cd1fe8d003a085858ca5b90cc74d9 (patch)
treedb194596629f6517d02d37259990ffda1e4cfcba /tools
parentfbdd17ec5ce2e5e4027356fcfde769b88d15702f (diff)
downloadlinux-ae450a7d054cd1fe8d003a085858ca5b90cc74d9.tar.gz
linux-ae450a7d054cd1fe8d003a085858ca5b90cc74d9.tar.bz2
linux-ae450a7d054cd1fe8d003a085858ca5b90cc74d9.zip
perf tools: Fix double free in perf test 21 (code-reading.c)
perf_evlist__delete() deletes attached cpu and thread maps but the test is still using them, so remove them from the evlist before deleting it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: http://lkml.kernel.org/r/53465E3E.8070201@intel.com Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/tests/code-reading.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 653a8fe2db95..bfb186900ac0 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -504,6 +504,7 @@ static int do_test_code_reading(bool try_kcore)
if (ret < 0) {
if (!excl_kernel) {
excl_kernel = true;
+ perf_evlist__set_maps(evlist, NULL, NULL);
perf_evlist__delete(evlist);
evlist = NULL;
continue;