Commit e725920c authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf env: Free memory nodes data

Forgot to free env's memory nodes, adding needed code to perf_env__exit.
Signed-off-by: default avatarJiri 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent bbb68468
...@@ -32,6 +32,10 @@ void perf_env__exit(struct perf_env *env) ...@@ -32,6 +32,10 @@ void perf_env__exit(struct perf_env *env)
for (i = 0; i < env->caches_cnt; i++) for (i = 0; i < env->caches_cnt; i++)
cpu_cache_level__free(&env->caches[i]); cpu_cache_level__free(&env->caches[i]);
zfree(&env->caches); 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[]) int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment