aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 2a85205ba01a..82260c56db3d 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -439,6 +439,11 @@ static int __cmd_record(int argc, const char **argv)
439 else 439 else
440 header = perf_header__new(); 440 header = perf_header__new();
441 441
442 if (header == NULL) {
443 pr_err("Not enough memory for reading perf file header\n");
444 return -1;
445 }
446
442 if (raw_samples) { 447 if (raw_samples) {
443 perf_header__set_feat(header, HEADER_TRACE_INFO); 448 perf_header__set_feat(header, HEADER_TRACE_INFO);
444 } else { 449 } else {