Skip to content

Commit

Permalink
perf tools: Fix double free in perf test 21 (code-reading.c)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Hunter authored and Jiri Olsa committed Apr 15, 2014
1 parent fbdd17e commit ae450a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/tests/code-reading.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae450a7

Please sign in to comment.