summaryrefslogtreecommitdiff
path: root/tools/perf/arch/x86/util/iostat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/arch/x86/util/iostat.c')
-rw-r--r--tools/perf/arch/x86/util/iostat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/arch/x86/util/iostat.c b/tools/perf/arch/x86/util/iostat.c
index 7eb0a7b00b95..df7b5dfcc26a 100644
--- a/tools/perf/arch/x86/util/iostat.c
+++ b/tools/perf/arch/x86/util/iostat.c
@@ -10,6 +10,7 @@
#include <api/fs/fs.h>
#include <linux/kernel.h>
#include <linux/err.h>
+#include <linux/zalloc.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
@@ -100,8 +101,8 @@ static void iio_root_ports_list_free(struct iio_root_ports_list *list)
if (list) {
for (idx = 0; idx < list->nr_entries; idx++)
- free(list->rps[idx]);
- free(list->rps);
+ zfree(&list->rps[idx]);
+ zfree(&list->rps);
free(list);
}
}
@@ -390,7 +391,7 @@ void iostat_release(struct evlist *evlist)
evlist__for_each_entry(evlist, evsel) {
if (rp != evsel->priv) {
rp = evsel->priv;
- free(evsel->priv);
+ zfree(&evsel->priv);
}
}
}