diff options
| -rw-r--r-- | tools/perf/util/thread_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c index 8c3c3a0751bd..920136dd8c2e 100644 --- a/tools/perf/util/thread_map.c +++ b/tools/perf/util/thread_map.c | |||
| @@ -22,7 +22,7 @@ static int filter(const struct dirent *dir) | |||
| 22 | 22 | ||
| 23 | static struct thread_map *thread_map__realloc(struct thread_map *map, int nr) | 23 | static struct thread_map *thread_map__realloc(struct thread_map *map, int nr) |
| 24 | { | 24 | { |
| 25 | size_t size = sizeof(*map) + sizeof(pid_t) * nr; | 25 | size_t size = sizeof(*map) + sizeof(map->map[0]) * nr; |
| 26 | 26 | ||
| 27 | return realloc(map, size); | 27 | return realloc(map, size); |
| 28 | } | 28 | } |
