diff options
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/thread.c | 2 | ||||
-rw-r--r-- | tools/perf/util/thread.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 12c4341078f9..45efb5db0d19 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -8,7 +8,7 @@ static struct thread *thread__new(pid_t pid) { - struct thread *self = malloc(sizeof(*self)); + struct thread *self = calloc(1, sizeof(*self)); if (self != NULL) { self->pid = pid; diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 665d1f3dc977..32aea3c1c2ad 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h @@ -7,6 +7,7 @@ struct thread { struct rb_node rb_node; struct list_head maps; pid_t pid; + char shortname[3]; char *comm; }; |