Commit 0161d82e authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf tools: Fix a memory leak on perf_read_values_destroy

After freeing each elements of the @values->value, we should free itself
too.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1323703017-6060-5-git-send-email-namhyung@gmail.comSigned-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d74c896b
...@@ -32,6 +32,7 @@ void perf_read_values_destroy(struct perf_read_values *values) ...@@ -32,6 +32,7 @@ void perf_read_values_destroy(struct perf_read_values *values)
for (i = 0; i < values->threads; i++) for (i = 0; i < values->threads; i++)
free(values->value[i]); free(values->value[i]);
free(values->value);
free(values->pid); free(values->pid);
free(values->tid); free(values->tid);
free(values->counterrawid); free(values->counterrawid);
......
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