intel_pmu: fix for possible null pointer dereference
authorKamil Wiatrowski <kamilx.wiatrowski@intel.com>
Mon, 5 Feb 2018 13:57:13 +0000 (13:57 +0000)
committeruser1 <user1@localhost.localdomain>
Sun, 11 Feb 2018 15:25:22 +0000 (16:25 +0100)
commit1d80ea3884c8116f32d7f47de3a263a9da426e37
treefba9ac6635cea13a977b4f2066514eaadbe2aafb
parent4012a0e3328806fa682411eea0382e5087bd80cc
intel_pmu: fix for possible null pointer dereference

Null pointer dereference could occur for invalid first hardware event.
In pmu_add_hw_events if the first event was not resolved, on the second
iteration the eventlist_last could be dereferenced to mark previous
event as group leader.

Change-Id: Ic2a2a3572d6835ca892d71f3e66812f356592d9e
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
src/intel_pmu.c