Re: [PATCH] [perf] sort : Fix null pointer dereference in _hist_entry__sym_snprintf

2020-06-18 Thread Andi Kleen
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > index d42339df20f8..25c7c96893f6 100644 > --- a/tools/perf/util/sort.c > +++ b/tools/perf/util/sort.c > @@ -294,6 +294,9 @@ static int _hist_entry__sym_snprintf(struct map_symbol > *ms, >u64 ip, ch

[PATCH] [perf] sort : Fix null pointer dereference in _hist_entry__sym_snprintf

2020-06-17 Thread Gaurav Singh
The pointer ms can be NULL. Add null check before dereferencing it to avoid segmentation fault. Signed-off-by: Gaurav Singh --- tools/perf/util/sort.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index d42339df20f8..25c7c96893f6 100644 --