[PATCH 4.14 13/48] perf/core: Fix potential NULL deref