diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-03-09 11:14:34 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-16 13:52:09 -0300 |
commit | e725920cdb1c79fdc71f2f164f59be8c411cad68 (patch) | |
tree | 1e6f59206430c574c02f942b104eb210f97c5a39 /tools/perf/util | |
parent | bbb68468641547d56c83012670bcaf77f3dacd64 (diff) | |
download | op-kernel-dev-e725920cdb1c79fdc71f2f164f59be8c411cad68.zip op-kernel-dev-e725920cdb1c79fdc71f2f164f59be8c411cad68.tar.gz |
perf env: Free memory nodes data
Forgot to free env's memory nodes, adding needed code to perf_env__exit.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180309101442.9224-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/env.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index 6d31186..4c84276 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[]) |