aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2019-03-05 15:25:35 +0000
committerArnaldo Carvalho de Melo <[email protected]>2019-03-06 21:20:33 +0000
commitbefa09b61f8bf1d7c34b8e6405f08d804640573c (patch)
treee3dfd454a14d78b5872db51afd31b87691b2d796 /tools/perf/builtin-script.c
parentperf evsel: Probe for precise_ip with simple attr (diff)
downloadkernel-befa09b61f8bf1d7c34b8e6405f08d804640573c.tar.gz
kernel-befa09b61f8bf1d7c34b8e6405f08d804640573c.zip
perf session: Fix double free in perf_data__close
We can't call perf_data__close and subsequently perf_session__delete, because it will call perf_data__close again and cause double free for data->file.path. $ perf report -i . incompatible file format (rerun with -v to learn more) free(): double free detected in tcache 2 Aborted (core dumped) In fact we don't need to call perf_data__close at all, because at the time the got out_close is reached, session->data is already initialized, so the perf_data__close call will be triggered from perf_session__delete. Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jonas Rabenstein <[email protected]> Cc: Nageswara R Sastry <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ravi Bangoria <[email protected]> Fixes: 2d4f27999b88 ("perf data: Add global path holder") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions