[PATCH 5.10 126/238] perf record: Fix possible incorrect free in record__switch_output()