From: Namhyung Kim Date: Mon, 12 Dec 2011 15:16:53 +0000 (+0900) Subject: perf tools: Fix a memory leak on perf_read_values_destroy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0161d82e9b740caa90f508138d1ae1b9d981b6d3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1323703017-6060-5-git-send-email-namhyung@gmail.com Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- 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) for (i = 0; i < values->threads; i++) free(values->value[i]); + free(values->value); free(values->pid); free(values->tid); free(values->counterrawid);