From: Arnaldo Carvalho de Melo Date: Wed, 13 May 2020 14:00:04 +0000 (-0300) Subject: perf evsel: Initialize evsel->per_pkg_mask to NULL in evsel__init() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f0aef4759be5efe525660055925b726efcd7cf27;p=linux.git perf evsel: Initialize evsel->per_pkg_mask to NULL in evsel__init() Just like with the other fields, this probably isn't fixing anything observable as evsel__new() uses zalloc() for the whole 'struct evsel', but since evsels can be embedded in larger structures and maybe those larger structures don't use zalloc() for some reason, init it to NULL just in case. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 654b79c1f4aca..55f2c6cf21b62 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -254,6 +254,7 @@ void evsel__init(struct evsel *evsel, evsel->metric_expr = NULL; evsel->metric_name = NULL; evsel->metric_events = NULL; + evsel->per_pkg_mask = NULL; evsel->collect_stat = false; evsel->pmu_name = NULL; }