Browse Source

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 <felipensp@gmail.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1381370438-4209-1-git-send-email-felipensp@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Felipe Pena 11 years ago
parent
commit
1df9297c85
1 changed files with 1 additions and 0 deletions
  1. 1 0
      tools/perf/tests/dso-data.c

+ 1 - 0
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;
 }