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>
This commit is contained in:
parent
a949fffb84
commit
1df9297c85
|
@ -35,6 +35,7 @@ static char *test_file(int size)
|
|||
if (size != write(fd, buf, size))
|
||||
templ = NULL;
|
||||
|
||||
free(buf);
|
||||
close(fd);
|
||||
return templ;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue