From: Felipe Pena Date: Thu, 10 Oct 2013 02:00:38 +0000 (-0300) Subject: perf tests: Fix memory leak in dso-data.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1df9297c8535a5bb2b776381e63d8334f87d4abe;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf tests: Fix memory leak in dso-data.c Fix for a memory leak on test_file() function in dso-data.c. Signed-off-by: Felipe Pena Acked-by: Jiri Olsa Cc: Ingo Molnar Cc: Jiri Olsa Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1381370438-4209-1-git-send-email-felipensp@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index dffe0551acaa..9cc81a3eb9b4 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c @@ -35,6 +35,7 @@ static char *test_file(int size) if (size != write(fd, buf, size)) templ = NULL; + free(buf); close(fd); return templ; }