lkml.org 
[lkml]   [2014]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf tools: Fix double free in perf test 21 (code-reading.c)
On Thu, Apr 10, 2014 at 12:02:54PM +0300, Adrian Hunter wrote:
> perf_evlist__delete() deletes attached cpu and thread maps
> but the test is still using them, so remove them from the
> evlist before deleting it.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> tools/perf/tests/code-reading.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
> index 653a8fe..bfb1869 100644
> --- a/tools/perf/tests/code-reading.c
> +++ b/tools/perf/tests/code-reading.c
> @@ -504,6 +504,7 @@ static int do_test_code_reading(bool try_kcore)
> if (ret < 0) {
> if (!excl_kernel) {
> excl_kernel = true;
> + perf_evlist__set_maps(evlist, NULL, NULL);
> perf_evlist__delete(evlist);
> evlist = NULL;
> continue;
> --
> 1.8.3.2
>
>

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

thanks,
jirka


\
 
 \ /
  Last update: 2014-04-10 11:21    [W:0.047 / U:4.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site