diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 4a5e1907a7ab..54c34c107cab 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -3372,7 +3372,7 @@ int perf_event__synthesize_attr(struct perf_tool *tool, size += sizeof(struct perf_event_header); size += ids * sizeof(u64); - ev = malloc(size); + ev = zalloc(size); if (ev == NULL) return -ENOMEM;