[PATCH 5.10 485/717] perf record: Fix memory leak when using --user-regs=? to list registers