diff options
author | Yasser Shalabi <[email protected]> | 2014-10-04 11:37:57 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2014-10-15 16:16:53 -0300 |
commit | b2e19a934a36b2b4affcde9c170c0f01afabe50a (patch) | |
tree | b00d90fd96490014ed6ac0363ebdae221e5a8014 | |
parent | ffe59788e69b548bd62cc9a053253a8af2cdda1d (diff) |
perf evlist: Fix for double free in tools/perf stat
Fix for double free bug in tools/perf due to dangling thread_map pointer
in perf_evlist struct.
Code path excercised when perf stat -C switch is used but not set and is
followed by another switch.
Example:
perf stat -C -e.
Signed-off-by: Yasser Shalabi <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/evlist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index b4b54d84e9b0..3c9e77d6b4c2 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1003,6 +1003,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target) out_delete_threads: thread_map__delete(evlist->threads); + evlist->threads = NULL; return -1; } |