Commit 1df9297c authored by Felipe Pena's avatar Felipe Pena Committed by 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: default avatarFelipe Pena <felipensp@gmail.com>
Acked-by: default avatarJiri 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment