[PATCH 6.1 398/885] perf record: Fix segfault with --overwrite and --max-size