Skip to content

Commit

Permalink
perf tests: Fix memory leak in dso-data.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Pena authored and Arnaldo Carvalho de Melo committed Oct 14, 2013
1 parent a949fff commit 1df9297
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/tests/dso-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static char *test_file(int size)
if (size != write(fd, buf, size))
templ = NULL;

free(buf);
close(fd);
return templ;
}
Expand Down

0 comments on commit 1df9297

Please sign in to comment.