Re: [PATCH 1/3] perf, evlist: Fix access of freed id arrays

From: Andi Kleen
Date: Tue Sep 24 2019 - 12:05:47 EST


> id/sample_id arrays are not created when evsel is open but
> we free it at close
>
> for now this fix seems correct to me.. we are moving id/sample_id
> arrays under libperf, I'll make a note to check on close and reopen
> of evsel and add some tests for that
>
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

It looks like there are still some bogus closes in such a case, at least valgrind
complains about some close(-1). But these should be harmless, so I guess
we can leave them for now.

-Andi