perf bench: Fix NULL pointer dereference in "perf bench all"