[PATCH 64/73] libperf: Call perf_evlist__munmap/close on perf_evlist__delete
From: Jiri Olsa
Date: Fri Sep 13 2019 - 09:26:37 EST
Let perf_evlist__delete do all the necessary cleanup.
All the cleanup functions check if the their data is
created before cleaning it up, so it's ok to call any
of them separately before perf_evlist__delete.
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
tools/perf/lib/evlist.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/lib/evlist.c b/tools/perf/lib/evlist.c
index 1c8a9e283adc..8920833afa9e 100644
@@ -132,6 +132,11 @@ void perf_evlist__exit(struct perf_evlist *evlist)
void perf_evlist__delete(struct perf_evlist *evlist)
+ if (evlist == NULL)