[PATCH 6.8 375/715] perf record: Fix possible incorrect free in record__switch_output()