mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events()
[ Upstream commit 11b6e5482e178055ec1f2444b55f2518713809d1 ]
The 'evname' variable can be NULL, as it is checked a few lines back,
check it before using.
Fixes: 9e207ddfa2 ("perf report: Show call graph from reference events")
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/
Signed-off-by: Gaurav Singh <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
335d720bb4
commit
676634f1a8
1 changed files with 1 additions and 2 deletions
|
|
@ -462,8 +462,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
|
|||
if (rep->time_str)
|
||||
ret += fprintf(fp, " (time slices: %s)", rep->time_str);
|
||||
|
||||
if (symbol_conf.show_ref_callgraph &&
|
||||
strstr(evname, "call-graph=no")) {
|
||||
if (symbol_conf.show_ref_callgraph && evname && strstr(evname, "call-graph=no")) {
|
||||
ret += fprintf(fp, ", show reference callgraph");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue