perf evlist: Fix for double free in tools/perf stat
authorYasser Shalabi <[email protected]>
Sat, 4 Oct 2014 15:37:57 +0000 (11:37 -0400)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 15 Oct 2014 19:16:53 +0000 (16:16 -0300)
commitb2e19a934a36b2b4affcde9c170c0f01afabe50a
treeb00d90fd96490014ed6ac0363ebdae221e5a8014
parentffe59788e69b548bd62cc9a053253a8af2cdda1d
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]>
tools/perf/util/evlist.c