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 <yassershalabi@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1412437077-13109-1-git-send-email-yassershalabi@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
out_delete_threads:
thread_map__delete(evlist->threads);
+ evlist->threads = NULL;
return -1;
}