Message ID | 20190814184051.3125-10-acme@kernel.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 75eb3811e942..d553d06a9aeb 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1492,7 +1492,7 @@ static int trace__read_syscall_info(struct trace *trace, int id) const char *name = syscalltbl__name(trace->sctbl, id); if (trace->syscalls.table == NULL) { - trace->syscalls.table = calloc(trace->sctbl->syscalls.nr_entries, sizeof(*sc)); + trace->syscalls.table = calloc(trace->sctbl->syscalls.max_id + 1, sizeof(*sc)); if (trace->syscalls.table == NULL) return -ENOMEM; }