lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tools/perf/tests: Fix memory leak in dso-data.c
On Wed, Oct 09, 2013 at 11:00:38PM -0300, Felipe Pena wrote:
> Fix for a memory leak on test_file() function in dso-data.c

oops, thanks ;-)

Acked-by: Jiri Olsa <jolsa@redhat.com>

>
> Signed-off-by: Felipe Pena <felipensp@gmail.com>
> ---
> tools/perf/tests/dso-data.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
> index dffe055..9cc81a3 100644
> --- a/tools/perf/tests/dso-data.c
> +++ b/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;
> }
> --
> 1.7.10.4
>


\
 
 \ /
  Last update: 2013-10-10 09:41    [W:0.054 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site