diff options
Diffstat (limited to 'tools/perf/util/stat-shadow.c')
-rw-r--r-- | tools/perf/util/stat-shadow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index cb891e5c2969..656065af4971 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -8,6 +8,7 @@ #include "evlist.h" #include "expr.h" #include "metricgroup.h" +#include <linux/zalloc.h> /* * AGGR_GLOBAL: Use CPU 0 @@ -775,7 +776,7 @@ static void generic_metric(struct perf_stat_config *config, print_metric(config, ctxp, NULL, NULL, "", 0); for (i = 1; i < pctx.num_ids; i++) - free((void *)pctx.ids[i].name); + zfree(&pctx.ids[i].name); } void perf_stat__print_shadow_stats(struct perf_stat_config *config, |