OSDN Git Service

perf evlist: Fix fix for freed id arrays
authorAndi Kleen <ak@linux.intel.com>
Fri, 11 Oct 2019 18:21:40 +0000 (11:21 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Oct 2019 14:51:33 +0000 (11:51 -0300)
commit98a8b2e60c69927b1f405c3b001a1de3f4e53901
tree56c5ff60dc9aa73ae008f8919665188480234d3e
parent6a6fac11b11299aa5bd8532ea863fc2f652af2b6
perf evlist: Fix fix for freed id arrays

In the earlier fix for the memory overrun of id arrays I managed to typo
the wrong event in the fix.

Of course we need to close the current event in the loop, not the
original failing event.

The same test case as in the original patch still passes.

Fixes: 7834fa948beb ("perf evlist: Fix access of freed id arrays")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20191011182140.8353-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c