diff options
author | Namhyung Kim <namhyung@gmail.com> | 2011-12-12 10:16:53 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-12-20 10:41:34 -0500 |
commit | 0161d82e9b740caa90f508138d1ae1b9d981b6d3 (patch) | |
tree | 4a4fad76eaf976fcf908a0e31bee9955d540ee65 /tools | |
parent | d74c896b7e3250a07f7d0315eecdd2ae1a7bc3c3 (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/values.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/values.c b/tools/perf/util/values.c index bdd33470b235..697c8b4e59cc 100644 --- a/tools/perf/util/values.c +++ b/tools/perf/util/values.c | |||
@@ -32,6 +32,7 @@ void perf_read_values_destroy(struct perf_read_values *values) | |||
32 | 32 | ||
33 | for (i = 0; i < values->threads; i++) | 33 | for (i = 0; i < values->threads; i++) |
34 | free(values->value[i]); | 34 | free(values->value[i]); |
35 | free(values->value); | ||
35 | free(values->pid); | 36 | free(values->pid); |
36 | free(values->tid); | 37 | free(values->tid); |
37 | free(values->counterrawid); | 38 | free(values->counterrawid); |