[PATCH 1/9] perf tools: Free memory nodes data

From: Jiri Olsa
Date: Fri Mar 09 2018 - 05:19:11 EST


Forgot to free env's memory nodes, adding
needed code to perf_env__exit.

Link: http://lkml.kernel.org/n/tip-ryyndcxqisxtfhbr6zp54jcy@xxxxxxxxxxxxxx
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
tools/perf/util/env.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 6d311868d850..4c842762e3f2 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -32,6 +32,10 @@ void perf_env__exit(struct perf_env *env)
for (i = 0; i < env->caches_cnt; i++)
cpu_cache_level__free(&env->caches[i]);
zfree(&env->caches);
+
+ for (i = 0; i < env->nr_memory_nodes; i++)
+ free(env->memory_nodes[i].set);
+ zfree(&env->memory_nodes);
}

int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[])
--
2.13.6