[PATCH 5.10 37/95] perf/core: Fix potential NULL deref