]> git.baikalelectronics.ru Git - kernel.git/commit
perf session: Check for NULL pointer before dereference
authorAmeer Hamza <amhamza.mgc@gmail.com>
Tue, 25 Jan 2022 12:11:41 +0000 (17:11 +0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 6 Feb 2022 12:03:06 +0000 (09:03 -0300)
commitd792a7a94c2c3ba045247266bee2e2bced7b495a
tree40a58726dd5499b36693c8fe5145cf4a29b4d5bf
parenta663520fcc4bce2814032e3de6c4e2665b9555e5
perf session: Check for NULL pointer before dereference

Move NULL pointer check before dereferencing the variable.

Addresses-Coverity: 1497622 ("Derereference before null check")
Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Ameer Hamza <amhamza.mgc@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: German Gomez <german.gomez@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Link: https://lore.kernel.org/r/20220125121141.18347-1-amhamza.mgc@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c