mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 11:53:53 +00:00
perf parse-events: Fix memory leaks found on parse_events
Fix a memory leak found by applying LLVM's libfuzzer on parse_events(). Signed-off-by: Ian Rogers <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: [email protected] Link: http://lore.kernel.org/lkml/[email protected] [ split from a larger patch, use zfree() ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
44d041b7b2
commit
e8dfb81838
@@ -1482,6 +1482,7 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
|
||||
|
||||
list_for_each_entry_safe(pos, tmp, &config_terms, list) {
|
||||
list_del_init(&pos->list);
|
||||
zfree(&pos->val.str);
|
||||
free(pos);
|
||||
}
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user