summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/thread_map.c')
-rw-r--r--tools/perf/util/thread_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index 281bf06f10f2..5b3511f2b6b1 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -13,9 +13,9 @@
#include <string.h>
#include <api/fs/fs.h>
#include <linux/string.h>
+#include <linux/zalloc.h>
#include "asm/bug.h"
#include "thread_map.h"
-#include "util.h"
#include "debug.h"
#include "event.h"
@@ -480,7 +480,7 @@ int thread_map__remove(struct thread_map *threads, int idx)
/*
* Free the 'idx' item and shift the rest up.
*/
- free(threads->map[idx].comm);
+ zfree(&threads->map[idx].comm);
for (i = idx; i < threads->nr - 1; i++)
threads->map[i] = threads->map[i + 1];