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

Andi Kleen
2019-09-24T16:05:47Z

> 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@redhat.com>

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