[PATCH 4.19 21/61] perf/core: Fix potential NULL deref