perf: Fix errors path in perf_output_begin()