diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index dc16231f7a5d849b7e6ae8737c8718689a5497f8..7fde9fb7996696bd97c875661dfb54d20fd6d706 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -673,9 +673,8 @@ void perf_evsel__free_counts(struct perf_evsel *evsel) void perf_evsel__exit(struct perf_evsel *evsel) { assert(list_empty(&evsel->node)); - xyarray__delete(evsel->fd); - xyarray__delete(evsel->sample_id); - free(evsel->id); + perf_evsel__free_fd(evsel); + perf_evsel__free_id(evsel); } void perf_evsel__delete(struct perf_evsel *evsel)