mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
perf tools: Fix double free in perf test 21 (code-reading.c)
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 <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jiri Olsa <[email protected]>
This commit is contained in:
parent
fbdd17ec5c
commit
ae450a7d05
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue