diff options
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 073f0e1c712..76e949a59ea 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -1005,6 +1005,9 @@ int event__synthesize_attr(struct perf_event_attr *attr, u16 ids, u64 *id, | |||
1005 | 1005 | ||
1006 | ev = malloc(size); | 1006 | ev = malloc(size); |
1007 | 1007 | ||
1008 | if (ev == NULL) | ||
1009 | return -ENOMEM; | ||
1010 | |||
1008 | ev->attr.attr = *attr; | 1011 | ev->attr.attr = *attr; |
1009 | memcpy(ev->attr.id, id, ids * sizeof(u64)); | 1012 | memcpy(ev->attr.id, id, ids * sizeof(u64)); |
1010 | 1013 | ||