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.com Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
d74c896b7e
commit
0161d82e9b
1 changed files with 1 additions and 0 deletions
|
@ -32,6 +32,7 @@ void perf_read_values_destroy(struct perf_read_values *values)
|
|||
|
||||
for (i = 0; i < values->threads; i++)
|
||||
free(values->value[i]);
|
||||
free(values->value);
|
||||
free(values->pid);
|
||||
free(values->tid);
|
||||
free(values->counterrawid);
|
||||
|
|
Loading…
Reference in a new issue