diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/session.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index ce6f51162386..d5fb60760bac 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -204,11 +204,28 @@ static void perf_session__delete_threads(struct perf_session *session) machine__delete_threads(&session->host_machine); } +static void perf_session_env__delete(struct perf_session_env *env) +{ + free(env->hostname); + free(env->os_release); + free(env->version); + free(env->arch); + free(env->cpu_desc); + free(env->cpuid); + + free(env->cmdline); + free(env->sibling_cores); + free(env->sibling_threads); + free(env->numa_nodes); + free(env->pmu_mappings); +} + void perf_session__delete(struct perf_session *self) { perf_session__destroy_kernel_maps(self); perf_session__delete_dead_threads(self); perf_session__delete_threads(self); + perf_session_env__delete(&self->header.env); machine__exit(&self->host_machine); close(self->fd); free(self); |