perf sort: Check return value of strdup()