提交 1df9297c 编写于 作者: F Felipe Pena 提交者: Arnaldo Carvalho de Melo

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: NFelipe Pena <felipensp@gmail.com>
Acked-by: NJiri 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 a949fffb
......@@ -35,6 +35,7 @@ static char *test_file(int size)
if (size != write(fd, buf, size))
templ = NULL;
free(buf);
close(fd);
return templ;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册