Skip to content

Commit b947299

Browse files
Like Xuacmel
authored andcommitted
perf jevents: Free the sys_event_tables list after processing entries
The compiler reports that free_sys_event_tables() is dead code. But according to the semantics, the "LIST_HEAD(sys_event_tables)" should also be released, just like we do with 'arch_std_events' in main(). Fixes: e9d32c1 ("perf vendor events: Add support for arch standard events") Signed-off-by: Like Xu <[email protected]> Reviewed-by: John Garry <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f6274b0 commit b947299

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/perf/pmu-events/jevents.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,7 @@ int main(int argc, char *argv[])
12851285
}
12861286

12871287
free_arch_std_events();
1288+
free_sys_event_tables();
12881289
free(mapfile);
12891290
return 0;
12901291

@@ -1306,6 +1307,7 @@ int main(int argc, char *argv[])
13061307
create_empty_mapping(output_file);
13071308
err_out:
13081309
free_arch_std_events();
1310+
free_sys_event_tables();
13091311
free(mapfile);
13101312
return ret;
13111313
}

0 commit comments

Comments
 (0)